shadowsocks

package
v0.3.1-rc.12 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 16 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 netapi.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 {
	netapi.EmptyDispatch
	// contains filtered or unexported fields
}

Shadowsocks shadowsocks

func (*Shadowsocks) Conn

func (s *Shadowsocks) Conn(ctx context.Context, addr netapi.Address) (conn net.Conn, err error)

Conn .

func (*Shadowsocks) PacketConn

func (s *Shadowsocks) PacketConn(ctx context.Context, tar netapi.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