Versions in this module Expand all Collapse all v0 v0.8.698 Aug 29, 2017 Changes in this version + const ReserveDays + func HandleUserTcpConnection(pxy Proxy, userConn frpNet.Conn) + func MakeGzipHandler(h http.Handler) http.Handler + func RunDashboardServer(addr string, port int64) (err error) + func StatsAddTrafficIn(name string, trafficIn int64) + func StatsAddTrafficOut(name string, trafficOut int64) + func StatsClearUselessInfo() + func StatsCloseClient(runid string) + func StatsCloseConnection(name string) + func StatsCloseProxy(proxyName string, proxyType string) + func StatsNewClient(runid string) + func StatsNewProxy(name string, proxyType string, runid string) + func StatsOpenConnection(name string) + type AuthWraper struct + func (aw *AuthWraper) ServeHTTP(w http.ResponseWriter, r *http.Request) + type BaseProxy struct + func (pxy *BaseProxy) Close() + func (pxy *BaseProxy) GetControl() *Control + func (pxy *BaseProxy) GetName() string + func (pxy *BaseProxy) GetWorkConnFromPool() (workConn frpNet.Conn, err error) + type ClientStatistics struct + ConnNum metric.Counter + LastCloseTime time.Time + LastStartTime time.Time + Online int + ProxyNum metric.Counter + type ClientStats struct + ConnNum int64 + LastCloseTime string + LastStartTime string + ProxyNum int64 + RunId string + func StatsGetClient(online int) []*ClientStats + type ClientStatsInfo struct + ConnNum int64 + LastCloseTime string + LastStartTime string + ProxyNum int64 + RunId string + type Control struct + func NewControl(svr *Service, ctlConn net.Conn, loginMsg *msg.Login) *Control + func (ctl *Control) GetFreePort() (port int64) + func (ctl *Control) GetFtpPort() (port int64) + func (ctl *Control) GetWorkConn() (workConn net.Conn, err error) + func (ctl *Control) RegisterProxy(pxyMsg *msg.NewProxy) (resp *msg.NewProxyResp, err error) + func (ctl *Control) RegisterWorkConn(conn net.Conn) + func (ctl *Control) Replaced(newCtl *Control) + func (ctl *Control) Start() + type ControlManager struct + func NewControlManager() *ControlManager + func (cm *ControlManager) Add(runId string, ctl *Control) (oldCtl *Control) + func (cm *ControlManager) GetById(runId string) (ctl *Control, ok bool) + type FtpProxy struct + func (pxy *FtpProxy) Close() + func (pxy *FtpProxy) GetConf() config.ProxyConf + func (pxy *FtpProxy) GetRemotePort() int64 + func (pxy *FtpProxy) Run() error + type GeneralResponse struct + Code int64 + Msg string + type GetClientInfoResp struct + Clients []*ClientStatsInfo + TotalNum int64 + TotalPage int64 + type GetFreePortResp struct + FreePort int + Proto string + type GetPortResp struct + Port int64 + type GetProxyInfoResp struct + Proxies []*ProxyStatsInfo + TotalNum int64 + TotalPage int64 + type GetProxyTrafficResp struct + Name string + TrafficIn []int64 + TrafficOut []int64 + type GzipWraper struct + func (gw *GzipWraper) ServeHTTP(w http.ResponseWriter, r *http.Request) + type HttpProxy struct + func (pxy *HttpProxy) Close() + func (pxy *HttpProxy) GetConf() config.ProxyConf + func (pxy *HttpProxy) GetRemotePort() int64 + func (pxy *HttpProxy) Run() (err error) + type HttpsProxy struct + func (pxy *HttpsProxy) Close() + func (pxy *HttpsProxy) GetConf() config.ProxyConf + func (pxy *HttpsProxy) GetRemotePort() int64 + func (pxy *HttpsProxy) Run() (err error) + type PortManager struct + func NewPortManager() *PortManager + func (pm *PortManager) Add(runId string, port int64) (oldPort int64) + func (pm *PortManager) AddFtp(runId string, port int64) (oldPort int64) + func (pm *PortManager) GetById(runId string) (port int64, ok bool) + func (pm *PortManager) GetFtpById(runId string) (port int64, ok bool) + type Proxy interface + Close func() + GetConf func() config.ProxyConf + GetControl func() *Control + GetName func() string + GetRemotePort func() int64 + GetWorkConnFromPool func() (workConn frpNet.Conn, err error) + Run func() error + func NewProxy(ctl *Control, pxyConf config.ProxyConf) (pxy Proxy, err error) + type ProxyManager struct + func NewProxyManager() *ProxyManager + func (pm *ProxyManager) Add(name string, pxy Proxy) error + func (pm *ProxyManager) Del(name string) + func (pm *ProxyManager) GetByName(name string) (pxy Proxy, ok bool) + type ProxyStatistics struct + CurConns metric.Counter + LastCloseTime time.Time + LastStartTime time.Time + Name string + ProxyType string + RunId string + TrafficIn metric.DateCounter + TrafficOut metric.DateCounter + type ProxyStats struct + CurConns int64 + LastCloseTime string + LastStartTime string + Name string + RunId string + TodayTrafficIn int64 + TodayTrafficOut int64 + Type string + func StatsGetProxiesByType(proxyType string) []*ProxyStats + type ProxyStatsInfo struct + Conf config.ProxyConf + CurConns int64 + LastCloseTime string + LastStartTime string + Name string + Status string + TodayTrafficIn int64 + TodayTrafficOut int64 + type ProxyTrafficInfo struct + Name string + TrafficIn []int64 + TrafficOut []int64 + func StatsGetProxyTraffic(name string) (res *ProxyTrafficInfo) + type ServerInfoResp struct + AuthTimeout int64 + ClientCounts int64 + CurConns int64 + HeartBeatTimeout int64 + MaxPoolCount int64 + ProxyTypeCounts map[string]int64 + SubdomainHost string + TotalTrafficIn int64 + TotalTrafficOut int64 + Version string + VhostHttpPort int64 + VhostHttpsPort int64 + type ServerStatistics struct + ClientCounts metric.Counter + ClientStatistics map[string]*ClientStatistics + CurConns metric.Counter + ProxyStatistics map[string]*ProxyStatistics + ProxyTypeCounts map[string]metric.Counter + TotalTrafficIn metric.DateCounter + TotalTrafficOut metric.DateCounter + type ServerStats struct + ClientCounts int64 + CurConns int64 + ProxyTypeCounts map[string]int64 + TotalTrafficIn int64 + TotalTrafficOut int64 + func StatsGetServer() *ServerStats + type Service struct + VhostHttpMuxer *vhost.HttpMuxer + VhostHttpsMuxer *vhost.HttpsMuxer + var ServerService *Service + func NewService() (svr *Service, err error) + func (svr *Service) DelProxy(name string) + func (svr *Service) RegisterControl(ctlConn frpNet.Conn, loginMsg *msg.Login) (err error) + func (svr *Service) RegisterProxy(name string, pxy Proxy) error + func (svr *Service) RegisterWorkConn(workConn frpNet.Conn, newMsg *msg.NewWorkConn) + func (svr *Service) Run() + type TcpProxy struct + func (pxy *TcpProxy) Close() + func (pxy *TcpProxy) GetConf() config.ProxyConf + func (pxy *TcpProxy) GetRemotePort() int64 + func (pxy *TcpProxy) Run() error + type UdpProxy struct + func (pxy *UdpProxy) Close() + func (pxy *UdpProxy) GetConf() config.ProxyConf + func (pxy *UdpProxy) GetRemotePort() int64 + func (pxy *UdpProxy) Run() (err error)