obfs4

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Obfs4ClientInit

func Obfs4ClientInit(node Node) error

Obfs4ClientInit initializes the obfs4 client

Types

type DialFunc

type DialFunc func(string, string) (net.Conn, error)

type Dialer

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

func NewDialer

func NewDialer(node Node) *Dialer

func (*Dialer) DialContext

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

type Node

type Node struct {
	Addr     string // ag: I'm guessing this is used like ip:port
	Host     string // ... but then this is redundant
	Protocol string // obfs4 in this case

	Values url.Values // contains the cert and iat-mode parameters
	// contains filtered or unexported fields
}

Node is a proxy node, that can be used to construct a proxy chain.

func NewNodeFromURI

func NewNodeFromURI(uri string) (Node, error)

NewNodeNewNodeFromURI returns a configured proxy node. It accepts a string with all the parameters needed to establish a connection to the obfs4 proxy, in the form: obfs4://<ip>:<port>?cert=<deadbeef>&iat-mode=<int>

Jump to

Keyboard shortcuts

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