uncensored

package
v0.0.0-...-6c44b69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package uncensored contains uncensored facilities. These facilities are used by Jafar code to evade its own censorship efforts.

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = Must(NewClient(""))

DefaultClient is the default client for DNS, HTTP, and TCP.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is DNS, HTTP, and TCP client.

func Must

func Must(client *Client, err error) *Client

Must panics if it's not possible to create a Client. Usually you should use it like `uncensored.Must(uncensored.NewClient(URL))`.

func NewClient

func NewClient(resolverURL string) (*Client, error)

NewClient creates a new Client.

func (*Client) Address

func (c *Client) Address() string

Address implements httptransport.Resolver.Address

func (*Client) CloseIdleConnections

func (c *Client) CloseIdleConnections()

CloseIdleConnections implement httptransport.RoundTripper.CloseIdleConnections

func (*Client) DialContext

func (c *Client) DialContext(ctx context.Context, network, address string) (net.Conn, error)

DialContext implements httptransport.Dialer.DialContext

func (*Client) LookupHost

func (c *Client) LookupHost(ctx context.Context, domain string) ([]string, error)

LookupHost implements httptransport.Resolver.LookupHost

func (*Client) Network

func (c *Client) Network() string

Network implements httptransport.Resolver.Network

func (*Client) RoundTrip

func (c *Client) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implement httptransport.RoundTripper.RoundTrip

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL