Versions in this module Expand all Collapse all v3 v3.8.0 Nov 13, 2024 v3.7.0 Oct 12, 2024 v3.6.0 Oct 7, 2024 Changes in this version type Request + DstAddr *model.AddrSpec v3.5.1 Oct 1, 2024 Changes in this version + const BindCmd + const ConnectCmd + const UDPAssociateCmd + var ConnectionRefusedErrors = metrics.RegisterMetric("socks5", "ConnectionRefusedErrors", metrics.COUNTER) + var DNSResolveErrors = metrics.RegisterMetric("socks5", "DNSResolveErrors", metrics.COUNTER) + var HTTPConnErrors = metrics.RegisterMetric(HTTPMetricGroupName, "ConnErrors", metrics.COUNTER) + var HTTPMetricGroupName = "HTTP proxy" + var HTTPRequests = metrics.RegisterMetric(HTTPMetricGroupName, "Requests", metrics.COUNTER) + var HTTPSchemeErrors = metrics.RegisterMetric(HTTPMetricGroupName, "SchemeErrors", metrics.COUNTER) + var HandshakeErrors = metrics.RegisterMetric("socks5", "HandshakeErrors", metrics.COUNTER) + var HostUnreachableErrors = metrics.RegisterMetric("socks5", "HostUnreachableErrors", metrics.COUNTER) + var NetworkUnreachableErrors = metrics.RegisterMetric("socks5", "NetworkUnreachableErrors", metrics.COUNTER) + var UDPAssociateDownloadBytes = metrics.RegisterMetric("socks5 UDP associate", "DownloadBytes", metrics.COUNTER) + var UDPAssociateDownloadPackets = metrics.RegisterMetric("socks5 UDP associate", "DownloadPackets", metrics.COUNTER) + var UDPAssociateErrors = metrics.RegisterMetric("socks5", "UDPAssociateErrors", metrics.COUNTER) + var UDPAssociateUploadBytes = metrics.RegisterMetric("socks5 UDP associate", "UploadBytes", metrics.COUNTER) + var UDPAssociateUploadPackets = metrics.RegisterMetric("socks5 UDP associate", "UploadPackets", metrics.COUNTER) + var UnsupportedCommandErrors = metrics.RegisterMetric("socks5", "UnsupportedCommandErrors", metrics.COUNTER) + func BidiCopyUDP(udpConn *net.UDPConn, tunnelConn *UDPAssociateTunnelConn) error + func Dial(proxyURI string, cmdType byte) func(string, string) (net.Conn, error) + func DialSocks5Proxy(c *Client) func(string, string) (net.Conn, *net.UDPConn, *net.UDPAddr, error) + func HTTPTransportProxyFunc(proxy string) func(*http.Request) (*url.URL, error) + func NewHTTPProxyServer(listenAddr string, proxy *HTTPProxy) *http.Server + func TransceiveUDPPacket(conn *net.UDPConn, proxyAddr, dstAddr *net.UDPAddr, payload []byte) ([]byte, error) + type AddrSpec struct + FQDN string + IP net.IP + Port int + Raw []byte + func (a *AddrSpec) Address() string + func (a *AddrSpec) String() string + type Auth struct + ClientSideAuthentication bool + EgressCredential *Credential + IngressCredentials []Credential + type Client struct + CmdType byte + Credential *Credential + Host string + Timeout time.Duration + type Config struct + AllowLocalDestination bool + AuthOpts Auth + BindIP net.IP + EgressController egress.Controller + HandshakeTimeout time.Duration + ProxyMux *protocol.Mux + Resolver *util.DNSResolver + UseProxy bool + type Credential struct + Password string + User string + type HTTPProxy struct + ProxyURI string + func (p *HTTPProxy) ServeHTTP(res http.ResponseWriter, req *http.Request) + type Request struct + Command uint8 + DestAddr *AddrSpec + Raw []byte + Version uint8 + type Server struct + func New(conf *Config) (*Server, error) + func (s *Server) Close() error + func (s *Server) ListenAndServe(network, addr string) error + func (s *Server) Serve(l net.Listener) error + func (s *Server) ServeConn(conn net.Conn) error + type UDPAssociateTunnelConn struct + func WrapUDPAssociateTunnel(conn io.ReadWriteCloser) *UDPAssociateTunnelConn + func (c *UDPAssociateTunnelConn) Close() error + func (c *UDPAssociateTunnelConn) Read(b []byte) (n int, err error) + func (c *UDPAssociateTunnelConn) Write(b []byte) (int, error) Other modules containing this package github.com/enfein/mieru