shadowsocks

package
v0.3.1-rc.6 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Example
simple := simple.New(&protocol.Protocol_Simple{
	Simple: &protocol.Simple{
		Host:             "127.0.0.1",
		Port:             1080,
		PacketConnDirect: false,
	},
})
ws := websocket.New(&protocol.Protocol_Websocket{
	Websocket: &protocol.Websocket{
		Host: "localhost",
	},
})

ss := New(&protocol.Protocol_Shadowsocks{
	Shadowsocks: &protocol.Shadowsocks{
		Method:   "aes-128-gcm",
		Password: "test",
	},
})

var err error
var conn proxy.Proxy
for _, wrap := range []protocol.WrapProxy{simple, ws, ss} {
	conn, err = wrap(conn)
	if err != nil {
		panic(err)
	}
}
Output:

func NewHTTPOBFS

func NewHTTPOBFS(config *protocol.Protocol_ObfsHttp) protocol.WrapProxy

func NewPacketConn

func NewPacketConn(conn net.PacketConn) net.PacketConn

Types

type HTTPObfs

type HTTPObfs struct {
	net.Conn
	// contains filtered or unexported fields
}
from https://github.com/Dreamacro/clash/blob/master/component/simple-obfs/http.go

HTTPObfs is shadowsocks http simple-obfs implementation

func (*HTTPObfs) Read

func (ho *HTTPObfs) Read(b []byte) (int, error)

func (*HTTPObfs) Write

func (ho *HTTPObfs) Write(b []byte) (int, error)

type Shadowsocks

type Shadowsocks struct {
	proxy.EmptyDispatch
	// contains filtered or unexported fields
}

Shadowsocks shadowsocks

func (*Shadowsocks) Conn

func (s *Shadowsocks) Conn(addr proxy.Address) (conn net.Conn, err error)

Conn .

func (*Shadowsocks) PacketConn

func (s *Shadowsocks) PacketConn(tar proxy.Address) (net.PacketConn, error)

PacketConn .

Directories

Path Synopsis
Package bloom implements Bloom Filter using double hashing
Package bloom implements Bloom Filter using double hashing
Package shadowaead implements a simple AEAD-protected secure protocol.
Package shadowaead implements a simple AEAD-protected secure protocol.

Jump to

Keyboard shortcuts

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