ss

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: GPL-3.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListCipher

func ListCipher() string

ListCipher returns all the ciphers supported.

func NewSSDialer

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

NewSSDialer returns a ss proxy dialer.

func NewSSServer

func NewSSServer(s string, p proxy.Proxy) (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 is a base ss struct.

func NewSS

func NewSS(s string, d proxy.Dialer, p proxy.Proxy) (*SS, error)

NewSS returns a ss 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) Serve added in v0.6.9

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

Serve serves a connection.

Jump to

Keyboard shortcuts

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