obfs

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: GPL-3.0 Imports: 13 Imported by: 2

Documentation

Overview

Package obfs implements simple-obfs of ss

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewObfsDialer

func NewObfsDialer(s string, dialer proxy.Dialer) (proxy.Dialer, error)

NewObfsDialer returns a proxy dialer.

Types

type HTTPObfs

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

HTTPObfs struct

func NewHTTPObfs

func NewHTTPObfs(obfsHost, obfsURI, obfsUA string) *HTTPObfs

NewHTTPObfs returns a HTTPObfs object

func (*HTTPObfs) NewConn

func (p *HTTPObfs) NewConn(c net.Conn) (net.Conn, error)

NewConn returns a new obfs connection

type HTTPObfsConn

type HTTPObfsConn struct {
	*HTTPObfs

	net.Conn
	// contains filtered or unexported fields
}

HTTPObfsConn struct

func (*HTTPObfsConn) Read

func (c *HTTPObfsConn) Read(b []byte) (n int, err error)

type Obfs

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

Obfs struct.

func NewObfs

func NewObfs(s string, d proxy.Dialer) (*Obfs, error)

NewObfs returns a proxy struct.

func (*Obfs) Addr

func (s *Obfs) Addr() string

Addr returns forwarder's address.

func (*Obfs) Dial

func (s *Obfs) Dial(network, addr string) (net.Conn, error)

Dial connects to the address addr on the network net via the proxy.

func (*Obfs) DialUDP

func (s *Obfs) DialUDP(network, addr string) (net.PacketConn, net.Addr, error)

DialUDP connects to the given address via the proxy.

type TLSObfs

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

TLSObfs struct

func NewTLSObfs

func NewTLSObfs(obfsHost string) *TLSObfs

NewTLSObfs returns a TLSObfs object

func (*TLSObfs) NewConn

func (p *TLSObfs) NewConn(c net.Conn) (net.Conn, error)

NewConn returns a new obfs connection

type TLSObfsConn

type TLSObfsConn struct {
	*TLSObfs

	net.Conn
	// contains filtered or unexported fields
}

TLSObfsConn struct

func (*TLSObfsConn) Read

func (c *TLSObfsConn) Read(b []byte) (int, error)

func (*TLSObfsConn) Write

func (c *TLSObfsConn) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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