uncensored

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package uncensored contains code used by Jafar to evade its own censorship efforts by taking alternate routes.

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 netx.Resolver.Address

func (*Client) CloseIdleConnections

func (c *Client) CloseIdleConnections()

CloseIdleConnections implement netx.HTTPRoundTripper.CloseIdleConnections

func (*Client) DialContext

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

DialContext implements netx.Dialer.DialContext

func (*Client) LookupHost

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

LookupHost implements netx.Resolver.LookupHost

func (*Client) Network

func (c *Client) Network() string

Network implements netx.Resolver.Network

func (*Client) RoundTrip

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

RoundTrip implement netx.HTTPRoundTripper.RoundTrip

Jump to

Keyboard shortcuts

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