model

package
v0.70.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

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"`
	Version          string `json:"version,omitempty"`
	WireProtocol     string `json:"wireProtocol,omitempty"`
	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 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"`
	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"`
	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 V2ClientDetailResp added in v0.70.0

type V2ClientDetailResp struct {
	ClientInfoResp
	Status V2ClientStatusResp `json:"status"`
}

type V2ClientStatusResp added in v0.70.0

type V2ClientStatusResp struct {
	State      string `json:"phase"`
	CurConns   int64  `json:"curConns"`
	ProxyCount int64  `json:"proxyCount"`
}

type V2HTTPProxySpec added in v0.70.0

type V2HTTPProxySpec struct {
	V2ProxyBaseSpec
	CustomDomains     []string `json:"customDomains,omitempty"`
	Subdomain         string   `json:"subdomain,omitempty"`
	Locations         []string `json:"locations,omitempty"`
	HostHeaderRewrite string   `json:"hostHeaderRewrite,omitempty"`
}

type V2HTTPSProxySpec added in v0.70.0

type V2HTTPSProxySpec struct {
	V2ProxyBaseSpec
	CustomDomains []string `json:"customDomains,omitempty"`
	Subdomain     string   `json:"subdomain,omitempty"`
}

type V2PageResp added in v0.70.0

type V2PageResp[T any] struct {
	Total    int `json:"total"`
	Page     int `json:"page"`
	PageSize int `json:"pageSize"`
	Items    []T `json:"items"`
}

type V2ProxyBaseSpec added in v0.70.0

type V2ProxyBaseSpec struct {
	Annotations  map[string]string        `json:"annotations,omitempty"`
	Metadatas    map[string]string        `json:"metadatas,omitempty"`
	Transport    *V2ProxyTransportSpec    `json:"transport,omitempty"`
	LoadBalancer *V2ProxyLoadBalancerSpec `json:"loadBalancer,omitempty"`
}

type V2ProxyLoadBalancerSpec added in v0.70.0

type V2ProxyLoadBalancerSpec struct {
	Group string `json:"group"`
}

type V2ProxyResp added in v0.70.0

type V2ProxyResp struct {
	Name     string            `json:"name"`
	User     string            `json:"user"`
	ClientID string            `json:"clientID"`
	Spec     V2ProxySpec       `json:"spec"`
	Status   V2ProxyStatusResp `json:"status"`
}

type V2ProxySpec added in v0.70.0

type V2ProxySpec struct {
	Type string `json:"type"`

	TCP    *V2TCPProxySpec    `json:"tcp,omitempty"`
	UDP    *V2UDPProxySpec    `json:"udp,omitempty"`
	HTTP   *V2HTTPProxySpec   `json:"http,omitempty"`
	HTTPS  *V2HTTPSProxySpec  `json:"https,omitempty"`
	TCPMux *V2TCPMuxProxySpec `json:"tcpmux,omitempty"`
	STCP   *V2STCPProxySpec   `json:"stcp,omitempty"`
	SUDP   *V2SUDPProxySpec   `json:"sudp,omitempty"`
	XTCP   *V2XTCPProxySpec   `json:"xtcp,omitempty"`
}

type V2ProxyStatusResp added in v0.70.0

type V2ProxyStatusResp struct {
	State           string `json:"phase"`
	TodayTrafficIn  int64  `json:"todayTrafficIn"`
	TodayTrafficOut int64  `json:"todayTrafficOut"`
	CurConns        int64  `json:"curConns"`
	LastStartAt     int64  `json:"lastStartAt,omitempty"`
	LastCloseAt     int64  `json:"lastCloseAt,omitempty"`
}

type V2ProxyTrafficPointResp added in v0.70.0

type V2ProxyTrafficPointResp struct {
	Date       string `json:"date"`
	TrafficIn  int64  `json:"trafficIn"`
	TrafficOut int64  `json:"trafficOut"`
}

type V2ProxyTrafficResp added in v0.70.0

type V2ProxyTrafficResp struct {
	Name        string                    `json:"name"`
	Unit        string                    `json:"unit"`
	Granularity string                    `json:"granularity"`
	History     []V2ProxyTrafficPointResp `json:"history"`
}

type V2ProxyTransportSpec added in v0.70.0

type V2ProxyTransportSpec struct {
	UseEncryption      bool   `json:"useEncryption"`
	UseCompression     bool   `json:"useCompression"`
	BandwidthLimit     string `json:"bandwidthLimit"`
	BandwidthLimitMode string `json:"bandwidthLimitMode"`
}

type V2STCPProxySpec added in v0.70.0

type V2STCPProxySpec struct {
	V2ProxyBaseSpec
}

type V2SUDPProxySpec added in v0.70.0

type V2SUDPProxySpec struct {
	V2ProxyBaseSpec
}

type V2SystemInfoConfigResp added in v0.70.0

type V2SystemInfoConfigResp struct {
	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"`
	TLSForce              bool   `json:"tlsForce"`
}

type V2SystemInfoResp added in v0.70.0

type V2SystemInfoResp struct {
	Version string                 `json:"version"`
	Config  V2SystemInfoConfigResp `json:"config"`
	Status  V2SystemInfoStatusResp `json:"status"`
}

type V2SystemInfoStatusResp added in v0.70.0

type V2SystemInfoStatusResp struct {
	TotalTrafficIn  int64            `json:"totalTrafficIn"`
	TotalTrafficOut int64            `json:"totalTrafficOut"`
	CurConns        int64            `json:"curConns"`
	ClientCounts    int64            `json:"clientCounts"`
	ProxyTypeCounts map[string]int64 `json:"proxyTypeCount"`
}

type V2SystemPruneResp added in v0.70.0

type V2SystemPruneResp struct {
	Type    string `json:"type"`
	Cleared int    `json:"cleared"`
	Total   int    `json:"total"`
}

type V2TCPMuxProxySpec added in v0.70.0

type V2TCPMuxProxySpec struct {
	V2ProxyBaseSpec
	CustomDomains   []string `json:"customDomains,omitempty"`
	Subdomain       string   `json:"subdomain,omitempty"`
	Multiplexer     string   `json:"multiplexer,omitempty"`
	RouteByHTTPUser string   `json:"routeByHTTPUser,omitempty"`
}

type V2TCPProxySpec added in v0.70.0

type V2TCPProxySpec struct {
	V2ProxyBaseSpec
	RemotePort *int `json:"remotePort,omitempty"`
}

type V2UDPProxySpec added in v0.70.0

type V2UDPProxySpec struct {
	V2ProxyBaseSpec
	RemotePort *int `json:"remotePort,omitempty"`
}

type V2UserResp added in v0.70.0

type V2UserResp struct {
	User        string `json:"user"`
	ClientCount int    `json:"clientCount"`
	ProxyCount  int    `json:"proxyCount"`
}

type V2XTCPProxySpec added in v0.70.0

type V2XTCPProxySpec struct {
	V2ProxyBaseSpec
}

type XTCPOutConf

type XTCPOutConf struct {
	BaseOutConf
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL