core

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBrokenSIP003Args = errors.New("invalid SIP003 args")

Functions

func GenerateCertificate

func GenerateCertificate(serverName string) (dnsName string, keyPEM, certPEM []byte, err error)

func GetControlFunc

func GetControlFunc(conf *TcpConfig) func(network, address string, c syscall.RawConn) error

Types

type Client added in v0.5.0

type Client struct {
	Listener           net.Listener
	ServerAddr         string
	Auth               string
	ServerName         string
	CertPool           *x509.CertPool
	InsecureSkipVerify bool
	Timeout            time.Duration
	AndroidVPNMode     bool
	TFO                bool
	Mux                int
	// contains filtered or unexported fields
}

func (*Client) ActiveAndServe added in v0.5.0

func (c *Client) ActiveAndServe() error

type SIP003Args

type SIP003Args struct {
	SS_REMOTE_HOST    string
	SS_REMOTE_PORT    string
	SS_LOCAL_HOST     string
	SS_LOCAL_PORT     string
	SS_PLUGIN_OPTIONS SpoArgs
}

SIP003Args contains sip003 args

func GetSIP003Args

func GetSIP003Args() (*SIP003Args, error)

GetSIP003Args get sip003 args from os.Environ(), if no args, returns nil

func (*SIP003Args) GetLocalAddr

func (args *SIP003Args) GetLocalAddr() string

func (*SIP003Args) GetRemoteAddr

func (args *SIP003Args) GetRemoteAddr() string

type Server added in v0.5.0

type Server struct {
	Listener net.Listener
	Dst      string
	Auth     string

	Certificates []tls.Certificate
	Timeout      time.Duration
	// contains filtered or unexported fields
}

func (*Server) ActiveAndServe added in v0.5.0

func (s *Server) ActiveAndServe() error

type SpoArgs added in v0.4.4

type SpoArgs map[string]string

type TcpConfig

type TcpConfig struct {
	AndroidVPN bool
	EnableTFO  bool
}

Jump to

Keyboard shortcuts

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