internal

package
v0.0.0-...-2cee7fc Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHost

func DefaultHost(h, port string) string

func DialTLSClient

func DialTLSClient(addr string, conf *tls.Config) (net.Conn, error)

func NewTLSConfig

func NewTLSConfig(pem, key string, poolPem ...string) (*tls.Config, error)

func NewTLSListen

func NewTLSListen(addr, pem, key, clientCert string) (net.Listener, error)

func StartForward

func StartForward(addr string, dialer Dialer) error

func StartProxy

func StartProxy(listener net.Listener) error

func StartProxyClient

func StartProxyClient(addr, proxyAddr, pem, key string) error

func StartProxyServer

func StartProxyServer(addr, pem, key, clientPem string) error

Types

type Dialer

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

type TLSForward

type TLSForward struct {
	ProxyAddr string
	Pem       string
	Key       string
	// contains filtered or unexported fields
}

func (*TLSForward) Dial

func (x *TLSForward) Dial() (net.Conn, error)

type XORConn

type XORConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*XORConn) Read

func (x *XORConn) Read(b []byte) (n int, err error)

实现 net.Conn 接口的 Read 方法

func (*XORConn) Write

func (x *XORConn) Write(b []byte) (n int, err error)

实现 net.Conn 接口的 Write 方法

type XORForward

type XORForward struct {
	ProxyAddr string
	Key       []byte
}

func (*XORForward) Dial

func (f *XORForward) Dial() (net.Conn, error)

type XORProxy

type XORProxy struct {
	Key []byte
	net.Listener
}

func (*XORProxy) Accept

func (p *XORProxy) Accept() (net.Conn, error)

Jump to

Keyboard shortcuts

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