MCPcopy Create free account
hub / github.com/bepass-org/proxy / Server

Struct Server

pkg/socks5/server.go:13–34  ·  view source on GitHub ↗

Server is accepting connections and handling the details of the SOCKS5 protocol

Source from the content-addressed store, hash-verified

11
12// Server is accepting connections and handling the details of the SOCKS5 protocol
13type Server struct {
14 // bind is the address to listen on
15 Bind string
16 // ProxyDial specifies the optional proxyDial function for
17 // establishing the transport connection.
18 ProxyDial statute.ProxyDialFunc
19 // ProxyListenPacket specifies the optional proxyListenPacket function for
20 // establishing the transport connection.
21 ProxyListenPacket statute.ProxyListenPacket
22 // PacketForwardAddress specifies the packet forwarding address
23 PacketForwardAddress statute.PacketForwardAddress
24 // UserConnectHandle gives the user control to handle the TCP CONNECT requests
25 UserConnectHandle statute.UserConnectHandler
26 // UserAssociateHandle gives the user control to handle the UDP ASSOCIATE requests
27 UserAssociateHandle statute.UserAssociateHandler
28 // Logger error log
29 Logger statute.Logger
30 // Context is default context
31 Context context.Context
32 // BytesPool getting and returning temporary bytes for use by io.CopyBuffer
33 BytesPool statute.BytesPool
34}
35
36func NewServer(options ...ServerOption) *Server {
37 s := &Server{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected