ss

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListCipher

func ListCipher() string

ListCipher .

func NewSSDialer

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

NewSSDialer returns a ss proxy dialer.

func NewSSServer

func NewSSServer(s string, dialer proxy.Dialer) (proxy.Server, error)

NewSSServer returns a ss proxy server.

Types

type PktConn

type PktConn struct {
	net.PacketConn
	// contains filtered or unexported fields
}

PktConn .

func NewPktConn

func NewPktConn(c net.PacketConn, writeAddr net.Addr, tgtAddr socks.Addr, tgtHeader bool) *PktConn

NewPktConn returns a PktConn

func (*PktConn) ReadFrom

func (pc *PktConn) ReadFrom(b []byte) (int, net.Addr, error)

ReadFrom overrides the original function from net.PacketConn

func (*PktConn) WriteTo

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

WriteTo overrides the original function from net.PacketConn

type SS

type SS struct {
	core.Cipher
	// contains filtered or unexported fields
}

SS .

func NewSS

func NewSS(s string, dialer proxy.Dialer) (*SS, error)

NewSS returns a shadowsocks proxy.

func (*SS) Addr

func (s *SS) Addr() string

Addr returns forwarder's address

func (*SS) Dial

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

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

func (*SS) DialUDP

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

DialUDP connects to the given address via the proxy.

func (*SS) ListenAndServe

func (s *SS) ListenAndServe()

ListenAndServe serves ss requests.

func (*SS) ListenAndServeTCP

func (s *SS) ListenAndServeTCP()

ListenAndServeTCP serves tcp ss requests.

func (*SS) ListenAndServeUDP

func (s *SS) ListenAndServeUDP()

ListenAndServeUDP serves udp ss requests.

func (*SS) NextDialer

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

NextDialer returns the next dialer

func (*SS) ServeTCP

func (s *SS) ServeTCP(c net.Conn)

ServeTCP serves tcp ss requests.

Jump to

Keyboard shortcuts

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