Versions in this module Expand all Collapse all v0 v0.6.0 Oct 9, 2020 Changes in this version + const SO_ORIGINAL_DST — linux/amd64 + const StatusAccepted + const StatusMethodAccepted + const StatusOpened + var IsMobile bool + func GetDstAddrFromRequest(request socks5.Request) (net.Addr, error) + func GetESNI(domain string) (*tls.ESNIKeys, error) + func GetURI(addr net.Addr) string + type Client struct + func NewClient(lc fx.Lifecycle, conf *config.ConfigGo, pool *goroutine.Pool, router *Router) *Client + func (client *Client) HandleMethodRequest(data []byte) (b []byte, action gnet.Action) + func (client *Client) OnClosed(c gnet.Conn, err error) (action gnet.Action) + func (client *Client) OnInitComplete(svr gnet.Server) (action gnet.Action) + func (client *Client) OnOpened(c gnet.Conn) (out []byte, action gnet.Action) + func (client *Client) OnShutdown(svr gnet.Server) + func (client *Client) React(frame []byte, c gnet.Conn) (out []byte, action gnet.Action) + func (client *Client) Run() error + type Conn struct + func NewConn(gnetConn gnet.Conn, clientConf *config.ClientGo) *Conn + func (conn *Conn) DialWs(request socks5.Request) (http.Header, error) + func (conn *Conn) DirectConnect() + func (conn *Conn) Run() + type HTTPServer struct + Client *Client + func (server *HTTPServer) Serve() error + type Map struct + func NewMap() *Map + func (m *Map) Delete(key string) + func (m *Map) Get(key string) (*Conn, bool) + func (m *Map) Put(conn *Conn) + type RateLimiter struct + func NewRateLimiter(bandwidth uint) *RateLimiter + func (rateLimiter *RateLimiter) Available() uint64 + func (rateLimiter *RateLimiter) Capacity() uint64 + func (rateLimiter *RateLimiter) Run() + func (rateLimiter *RateLimiter) Wait(tokens uint) error + type RedirServer struct + Client *Client + func (server *RedirServer) Run() + type Router struct + GeoIPDB *geoip2.Reader + func NewRouter(conf *config.ConfigGo) (*Router, error) + func (router *Router) Download() error + func (router *Router) RemoveCache(ip net.IP) + func (router *Router) Select(ip net.IP) bool + func (router *Router) SwitchOff() + func (router *Router) SwitchOn() + func (router *Router) Update() error + type Server struct + func NewServer(lc fx.Lifecycle, conf *config.ConfigGo) *Server + func (server *Server) Authenticate(ctx *fasthttp.RequestCtx) bool + func (server *Server) DeleteConfig(c *gin.Context) + func (server *Server) DeleteLog(c *gin.Context) + func (server *Server) DeleteMeta(c *gin.Context) + func (server *Server) DeleteNotice(c *gin.Context) + func (server *Server) DeletePlan(c *gin.Context) + func (server *Server) DeleteSession(c *gin.Context) + func (server *Server) DeleteUser(c *gin.Context) + func (server *Server) GetBucket(username string) (*RateLimiter, error) + func (server *Server) GetCaptcha(c *gin.Context) + func (server *Server) GetConfig(c *gin.Context) + func (server *Server) GetLogList(c *gin.Context) + func (server *Server) GetLogOne(c *gin.Context) + func (server *Server) GetMeta(c *gin.Context) + func (server *Server) GetNotice(c *gin.Context) + func (server *Server) GetNoticeOne(c *gin.Context) + func (server *Server) GetPlan(c *gin.Context) + func (server *Server) GetPlanOne(c *gin.Context) + func (server *Server) GetRole(c *gin.Context) (uint, error) + func (server *Server) GetSession(c *gin.Context) + func (server *Server) GetUser(c *gin.Context) + func (server *Server) GetUserList(c *gin.Context) + func (server *Server) GetUserOne(c *gin.Context) + func (server *Server) PostConfig(c *gin.Context) + func (server *Server) PostLog(c *gin.Context) + func (server *Server) PostMeta(c *gin.Context) + func (server *Server) PostNotice(c *gin.Context) + func (server *Server) PostPlan(c *gin.Context) + func (server *Server) PostSession(c *gin.Context) + func (server *Server) PostUser(c *gin.Context) + func (server *Server) PutConfig(c *gin.Context) + func (server *Server) PutLog(c *gin.Context) + func (server *Server) PutMeta(c *gin.Context) + func (server *Server) PutNotice(c *gin.Context) + func (server *Server) PutPlan(c *gin.Context) + func (server *Server) PutSession(c *gin.Context) + func (server *Server) PutUser(c *gin.Context) + func (server *Server) Run() + func (server *Server) ServeRoot(c *gin.Context) + type TCPSegmentConn struct + func (conn *TCPSegmentConn) Write(b []byte) (n int, err error)