Versions in this module Expand all Collapse all v1 v1.0.1 Apr 8, 2024 v1.0.0 Apr 8, 2024 Changes in this version + const CommandBind + const CommandConn + const CommandUdp + const ConnectFailed + const ConnectSuccess + const GssApi + const IanaAssignedMax + const IanaAssignedMin + const MethodConnect + const MethodDelete + const MethodGet + const MethodHead + const MethodOptions + const MethodPost + const MethodPut + const NoAcceptMethod + const ReservedForPrivateMax + const ReservedForPrivateMin + const Rsv + const SocketClient + const SocketServer + const SocksFive + const SslFileHost + const TargetDomain + const TargetIpv4 + const TargetIpv6 + const TcpClient + const TcpServer + const UsernamePassword + const Version + var Cache = NewStorage() + func GetAction(hostname string) func() (interface{}, error) + type Certificate struct + RootCa *x509.Certificate + RootCaStr []byte + RootKey *rsa.PrivateKey + RootKeyStr []byte + var Cert *Certificate + func NewCertificate() *Certificate + func (i *Certificate) GenerateKeyPair() (*rsa.PrivateKey, error) + func (i *Certificate) GeneratePem(host string) ([]byte, []byte, error) + func (i *Certificate) GenerateRootPemFile(host string) (*pem.Block, *pem.Block, error) + func (i *Certificate) Init() error + type ConnPeer struct + type HttpRequestEvent func(message []byte, request *http.Request, resolve ResolveHttpRequest, ...) bool + type HttpResponseEvent func(message []byte, response *http.Response, resolve ResolveHttpResponse, ...) bool + type ProxyHttp struct + func (i *ProxyHttp) DialContext() func(ctx context.Context, network, addr string) (conn net.Conn, err error) + func (i *ProxyHttp) Handle() + func (i *ProxyHttp) ReadRequestBody(reader io.Reader) ([]byte, error) + func (i *ProxyHttp) ReadResponseBody(response *http.Response) ([]byte, error) + func (i *ProxyHttp) RemoveHeader(header http.Header) + func (i *ProxyHttp) RemoveWsHeader() + func (i *ProxyHttp) SetRequest(request *http.Request) *http.Request + func (i *ProxyHttp) SslReceiveSend() + func (i *ProxyHttp) Transport(request *http.Request) (*http.Response, error) + func (i *ProxyHttp) WsIsConnected(conn *Websocket.Conn) bool + type ProxyServer struct + OnHttpRequestEvent HttpRequestEvent + OnHttpResponseEvent HttpResponseEvent + OnSocks5RequestEvent Socks5RequestEvent + OnSocks5ResponseEvent Socks5ResponseEvent + OnTcpClientStreamEvent TcpClientStreamEvent + OnTcpCloseEvent TcpClosetEvent + OnTcpConnectEvent TcpConnectEvent + OnTcpServerStreamEvent TcpServerStreamEvent + OnWsRequestEvent WsRequestEvent + OnWsResponseEvent WsResponseEvent + func NewProxyServer(port string, nagle bool, proxy string, to string, network string) *ProxyServer + func (i *ProxyServer) Install() + func (i *ProxyServer) Logo() + func (i *ProxyServer) MultiListen() + func (i *ProxyServer) Start() error + func (i *ProxyServer) Stop() error + func (i *ProxyServer) UnInstall() + type ProxySocks5 struct + func NewProxySocket() *ProxySocks5 + func (i *ProxySocks5) ByteToInt(input []byte) int32 + func (i *ProxySocks5) Handle() + func (i *ProxySocks5) IpV4(ipAddr string) bool + func (i *ProxySocks5) IpV6(ipAddr string) bool + func (i *ProxySocks5) Transport(out chan<- error, originConn net.Conn, targetConn net.Conn, role string) + type ProxyTcp struct + func (i *ProxyTcp) Handle() + func (i *ProxyTcp) Transport(out chan<- error, originConn net.Conn, targetConn net.Conn, role string) + type ResolveHttpRequest func(message []byte, request *http.Request) + type ResolveHttpResponse func(message []byte, response *http.Response) + type ResolveSocks5 func(buff []byte) (int, error) + type ResolveTcp func(buff []byte) (int, error) + type ResolveWs func(msgType int, message []byte) error + type Socks5RequestEvent func(message []byte, resolve ResolveSocks5, conn net.Conn) (int, error) + type Socks5ResponseEvent func(message []byte, resolve ResolveSocks5, conn net.Conn) (int, error) + type Storage struct + func NewStorage() *Storage + func (i *Storage) GetCertificate(hostname string, port string) (interface{}, error) + type TcpClientStreamEvent func(message []byte, resolve ResolveTcp, conn net.Conn) (int, error) + type TcpClosetEvent func(conn net.Conn) + type TcpConnectEvent func(conn net.Conn) + type TcpServerStreamEvent func(message []byte, resolve ResolveTcp, conn net.Conn) (int, error) + type WsRequestEvent func(msgType int, message []byte, resolve ResolveWs, conn net.Conn) error + type WsResponseEvent func(msgType int, message []byte, resolve ResolveWs, conn net.Conn) error