shadowsocks

package
v0.0.0-...-8e6527b Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(b []byte, s string) bool

Equal is ...

func NewConn

func NewConn(nc *net.TCPConn, proxyAuth string, cfg *tls.Config) net.Conn

NewConn gives a new net.Conn

func NewPacketConn

func NewPacketConn(nc *net.TCPConn, proxyAuth string, cfg *tls.Config) net.PacketConn

NewPacketConn gives a new net.PacketConn

func ParseURL

func ParseURL(s string) (server, method, password string, err error)

ParseURL is ...

Types

type Conn

type Conn struct {
	// Conn is ...
	net.Conn
	// Reader is ...
	Reader io.Reader
	// Writer is ...
	Writer io.Writer
	// contains filtered or unexported fields
}

Conn supports net.Conn

func (*Conn) CloseRead

func (c *Conn) CloseRead() error

CloseRead is gonet.CloseReader

func (*Conn) CloseWrite

func (c *Conn) CloseWrite() error

CloseWrite is gonet.CloseWriter

func (*Conn) LocalAddr

func (c *Conn) LocalAddr() net.Addr

LocalAddr net.Conn.LocalAddr and net.PacketConn.LocalAddr

func (*Conn) Read

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

Read is io.Reader

func (*Conn) Write

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

Write is io.Writer

type Dialer

type Dialer interface {
	Dial(string, string) (net.Conn, error)
	ListenPacket(string, string) (net.PacketConn, error)
}

Dialer is ...

type Handler

type Handler struct {
	// Dialer is ...
	Dialer Dialer
	// Cipehr is ...
	Cipher *core.Cipher
	// contains filtered or unexported fields
}

Handler is ...

func NewHandler

func NewHandler(s string, timeout time.Duration) (handler *Handler, err error)

NewHandler is ...

func (*Handler) Close

func (*Handler) Close() error

Close is ...

func (*Handler) Handle

func (h *Handler) Handle(conn gonet.Conn, tgt net.Addr) (err error)

Handle is ...

func (*Handler) HandlePacket

func (h *Handler) HandlePacket(conn gonet.PacketConn) error

HandlePacket is ...

type NetDialer

type NetDialer struct {
	Dialer net.Dialer
}

NetDialer is ...

func NewNetDialer

func NewNetDialer(server, password string) *NetDialer

NewNetDialer is ...

func (*NetDialer) Dial

func (d *NetDialer) Dial(network, addr string) (net.Conn, error)

Dial is ...

func (*NetDialer) ListenPacket

func (d *NetDialer) ListenPacket(network, addr string) (net.PacketConn, error)

ListenPacket is ...

type PacketConn

type PacketConn struct {
	// Conn is ...
	Conn
	// contains filtered or unexported fields
}

PacketConn is to gives a new net.PacketConn

func (*PacketConn) Read

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

Read is net.Conn.Read

func (*PacketConn) ReadFrom

func (c *PacketConn) ReadFrom(b []byte) (int, net.Addr, error)

ReadFrom is net.PacketConn.ReadFrom

func (*PacketConn) Write

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

Write is net.Conn.Write

func (*PacketConn) WriteTo

func (c *PacketConn) WriteTo(b []byte, addr net.Addr) (int, error)

WriteTo is net.PacketConn.WriteTo

type TLSDialer

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

TLSDialer transfer shadowsocks data over tcp and tls with HTTP CONNECT tunnel

func NewTLSDialer

func NewTLSDialer(server string, password string) (*TLSDialer, error)

NewTLSDialer replace original NewClient to support new protocol

func (*TLSDialer) Dial

func (d *TLSDialer) Dial(network, addr string) (net.Conn, error)

Dial gives a net.Conn

func (*TLSDialer) ListenPacket

func (d *TLSDialer) ListenPacket(network, addr string) (net.PacketConn, error)

ListenPacket gives a net.PacketConn

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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