Documentation
¶
Index ¶
- type BaseOutConf
- type ClientInfoResp
- type Controller
- func (c *Controller) APIClientDetail(ctx *httppkg.Context) (any, error)
- func (c *Controller) APIClientList(ctx *httppkg.Context) (any, error)
- func (c *Controller) APIProxyByName(ctx *httppkg.Context) (any, error)
- func (c *Controller) APIProxyByType(ctx *httppkg.Context) (any, error)
- func (c *Controller) APIProxyByTypeAndName(ctx *httppkg.Context) (any, error)
- func (c *Controller) APIProxyTraffic(ctx *httppkg.Context) (any, error)
- func (c *Controller) APIServerInfo(ctx *httppkg.Context) (any, error)
- func (c *Controller) DeleteProxies(ctx *httppkg.Context) (any, error)
- type GetProxyInfoResp
- type GetProxyStatsResp
- type GetProxyTrafficResp
- type HTTPOutConf
- type HTTPSOutConf
- type ProxyManager
- type ProxyStatsInfo
- type STCPOutConf
- type ServerInfoResp
- type TCPMuxOutConf
- type TCPOutConf
- type UDPOutConf
- type XTCPOutConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseOutConf ¶
type BaseOutConf struct {
v1.ProxyBaseConfig
}
type ClientInfoResp ¶
type ClientInfoResp struct {
Key string `json:"key"`
User string `json:"user"`
ClientID string `json:"clientID"`
RunID string `json:"runID"`
Hostname string `json:"hostname"`
ClientIP string `json:"clientIP,omitempty"`
FirstConnectedAt int64 `json:"firstConnectedAt"`
LastConnectedAt int64 `json:"lastConnectedAt"`
DisconnectedAt int64 `json:"disconnectedAt,omitempty"`
Online bool `json:"online"`
}
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController( serverCfg *v1.ServerConfig, clientRegistry *registry.ClientRegistry, pxyManager ProxyManager, ) *Controller
func (*Controller) APIClientDetail ¶
func (c *Controller) APIClientDetail(ctx *httppkg.Context) (any, error)
/api/clients/{key}
func (*Controller) APIClientList ¶
func (c *Controller) APIClientList(ctx *httppkg.Context) (any, error)
/api/clients
func (*Controller) APIProxyByName ¶
func (c *Controller) APIProxyByName(ctx *httppkg.Context) (any, error)
/api/proxies/:name
func (*Controller) APIProxyByType ¶
func (c *Controller) APIProxyByType(ctx *httppkg.Context) (any, error)
/api/proxy/:type
func (*Controller) APIProxyByTypeAndName ¶
func (c *Controller) APIProxyByTypeAndName(ctx *httppkg.Context) (any, error)
/api/proxy/:type/:name
func (*Controller) APIProxyTraffic ¶
func (c *Controller) APIProxyTraffic(ctx *httppkg.Context) (any, error)
/api/traffic/:name
func (*Controller) APIServerInfo ¶
func (c *Controller) APIServerInfo(ctx *httppkg.Context) (any, error)
/api/serverinfo
func (*Controller) DeleteProxies ¶
func (c *Controller) DeleteProxies(ctx *httppkg.Context) (any, error)
DELETE /api/proxies?status=offline
type GetProxyInfoResp ¶
type GetProxyInfoResp struct {
Proxies []*ProxyStatsInfo `json:"proxies"`
}
type GetProxyStatsResp ¶
type GetProxyStatsResp struct {
Name string `json:"name"`
Conf any `json:"conf"`
User string `json:"user,omitempty"`
ClientID string `json:"clientID,omitempty"`
ClientVersion string `json:"clientVersion,omitempty"`
TodayTrafficIn int64 `json:"todayTrafficIn"`
TodayTrafficOut int64 `json:"todayTrafficOut"`
CurConns int64 `json:"curConns"`
LastStartTime string `json:"lastStartTime"`
LastCloseTime string `json:"lastCloseTime"`
Status string `json:"status"`
}
Get proxy info by name.
type GetProxyTrafficResp ¶
type GetProxyTrafficResp struct {
Name string `json:"name"`
TrafficIn []int64 `json:"trafficIn"`
TrafficOut []int64 `json:"trafficOut"`
}
/api/traffic/:name
type HTTPOutConf ¶
type HTTPOutConf struct {
BaseOutConf
v1.DomainConfig
Locations []string `json:"locations"`
HostHeaderRewrite string `json:"hostHeaderRewrite"`
}
type HTTPSOutConf ¶
type HTTPSOutConf struct {
BaseOutConf
v1.DomainConfig
}
type ProxyStatsInfo ¶
type ProxyStatsInfo struct {
Name string `json:"name"`
Conf any `json:"conf"`
User string `json:"user,omitempty"`
ClientID string `json:"clientID,omitempty"`
ClientVersion string `json:"clientVersion,omitempty"`
TodayTrafficIn int64 `json:"todayTrafficIn"`
TodayTrafficOut int64 `json:"todayTrafficOut"`
CurConns int64 `json:"curConns"`
LastStartTime string `json:"lastStartTime"`
LastCloseTime string `json:"lastCloseTime"`
Status string `json:"status"`
}
Get proxy info.
type STCPOutConf ¶
type STCPOutConf struct {
BaseOutConf
}
type ServerInfoResp ¶
type ServerInfoResp struct {
Version string `json:"version"`
BindPort int `json:"bindPort"`
VhostHTTPPort int `json:"vhostHTTPPort"`
VhostHTTPSPort int `json:"vhostHTTPSPort"`
TCPMuxHTTPConnectPort int `json:"tcpmuxHTTPConnectPort"`
KCPBindPort int `json:"kcpBindPort"`
QUICBindPort int `json:"quicBindPort"`
SubdomainHost string `json:"subdomainHost"`
MaxPoolCount int64 `json:"maxPoolCount"`
MaxPortsPerClient int64 `json:"maxPortsPerClient"`
HeartBeatTimeout int64 `json:"heartbeatTimeout"`
AllowPortsStr string `json:"allowPortsStr,omitempty"`
TLSForce bool `json:"tlsForce,omitempty"`
TotalTrafficIn int64 `json:"totalTrafficIn"`
TotalTrafficOut int64 `json:"totalTrafficOut"`
CurConns int64 `json:"curConns"`
ClientCounts int64 `json:"clientCounts"`
ProxyTypeCounts map[string]int64 `json:"proxyTypeCount"`
}
type TCPMuxOutConf ¶
type TCPMuxOutConf struct {
BaseOutConf
v1.DomainConfig
Multiplexer string `json:"multiplexer"`
RouteByHTTPUser string `json:"routeByHTTPUser"`
}
type TCPOutConf ¶
type TCPOutConf struct {
BaseOutConf
RemotePort int `json:"remotePort"`
}
type UDPOutConf ¶
type UDPOutConf struct {
BaseOutConf
RemotePort int `json:"remotePort"`
}
type XTCPOutConf ¶
type XTCPOutConf struct {
BaseOutConf
}
Click to show internal directories.
Click to hide internal directories.