Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckIPFunc ¶
type GenericCallbackFunc ¶
type GenericCallbackFunc func(i interface{})
type Server ¶
type Server struct { Port int // Workers are used to balance requests. There are two groups of subsequent workers: Authenticators and ReqHandlers. NumAuthWorkers int NumReqHandleWorkers int // Size of the queue for the requests to be queue when all workers are idle. If the queue becomes full, // TCP listener blocks. ConnQueueSize int BufferSize int ConnTimeLimit time.Duration HandshakeStepTimeLimit time.Duration CheckIP CheckIPFunc // The 2 basic authentication methods in socks5 are the username/password subnegotiation and no authentication. // AuthMethodNoneAllowed will authenticate any requests that declare this method as valid. AuthMethodNoneAllowed bool // Returns a bool result of whether a request is authenticated. // It can also return a interface{} value that will be attached to a session and passed to // the callbacks when proxying starts and ends. This makes proxy sessions identifiable. Authenticate AuthFunc // The callback is called when the server starts proxying a session. // The value returned from AuthFunc is used as an argument for GenericCallbackFunc, // thus making it possible to store and handle data associated with a session. SessionStartCallback GenericCallbackFunc // Respectively to SessionStartCallback, SessionEndCallback is called once a session is canceled. SessionEndCallback GenericCallbackFunc LocalIP net.IP // contains filtered or unexported fields }
func (*Server) GetCurrentData ¶
func (*Server) ListenAndServe ¶
func (srv *Server) ListenAndServe()
Click to show internal directories.
Click to hide internal directories.