Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AppSecret = "frp-api-xxx"
View Source
var AppServerPort int
View Source
var AppServerPrefix string
View Source
var ClientMap sync.Map
Functions ¶
func LoadClientMap ¶
func LoadClientMap()
func LoadCustomDomainMap ¶
func SaveClientMap ¶
func SaveClientMap()
Types ¶
type AppConfig ¶
type AppConfig struct {
BindPort int `json:"bindPort"`
VhostHTTPPort int `json:"vhostHTTPPort"`
VhostHTTPSPort int `json:"vhostHTTPSPort"`
TcpMuxHTTPConnectPort int `json:"tcpmuxHTTPConnectPort"`
Custom404Page string `json:"custom404Page"`
ClientDefaultTls ClientDefaultTls `json:"client_default_tls"`
}
func GetAppConfig ¶
func GetAppConfig() AppConfig
type ClientDefaultTls ¶
type Vhost ¶
type Vhost struct {
Id string `json:"id"` // type+custom_domain值的md5,默认每个用户的type+custom_domain都是唯一
Type string `json:"type"`
Name string `json:"name"`
CustomDomain string `json:"custom_domain"`
CnameDomain string `json:"cname_domain"`
LocalAddr string `json:"local_addr"`
RemotePort int `json:"remote_port"`
CrtPath string `json:"crt_path"`
KeyPath string `json:"key_path"`
Status bool `json:"status"` //true.开启,false.关闭
CreatedAt int64 `json:"created_at"`
}
Click to show internal directories.
Click to hide internal directories.