core

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func DoClient

func DoClient(l net.Listener, serverAddr, hostName string, caPool *x509.CertPool, insecureSkipVerify, sendPaddingData bool, timeout time.Duration, vpnMode, tfo bool) error

func DoServer

func DoServer(l net.Listener, certificates []tls.Certificate, dst string, sendPaddingData bool, timeout time.Duration) error

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 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 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