obfs

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

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, dialer 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

func (*Obfs) NextDialer

func (s *Obfs) NextDialer(dstAddr string) proxy.Dialer

NextDialer returns the next dialer

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