|
@@ -69,6 +69,7 @@ type ServerCommonConf struct {
|
|
Token string `json:"token"`
|
|
Token string `json:"token"`
|
|
SubDomainHost string `json:"subdomain_host"`
|
|
SubDomainHost string `json:"subdomain_host"`
|
|
TcpMux bool `json:"tcp_mux"`
|
|
TcpMux bool `json:"tcp_mux"`
|
|
|
|
+ Custom404Page string `json:"custom_404_page"`
|
|
|
|
|
|
AllowPorts map[int]struct{}
|
|
AllowPorts map[int]struct{}
|
|
MaxPoolCount int64 `json:"max_pool_count"`
|
|
MaxPoolCount int64 `json:"max_pool_count"`
|
|
@@ -104,6 +105,7 @@ func GetDefaultServerConf() *ServerCommonConf {
|
|
MaxPortsPerClient: 0,
|
|
MaxPortsPerClient: 0,
|
|
HeartBeatTimeout: 90,
|
|
HeartBeatTimeout: 90,
|
|
UserConnTimeout: 10,
|
|
UserConnTimeout: 10,
|
|
|
|
+ Custom404Page: "",
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -293,6 +295,10 @@ func UnmarshalServerConfFromIni(defaultCfg *ServerCommonConf, content string) (c
|
|
cfg.TcpMux = true
|
|
cfg.TcpMux = true
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if tmpStr, ok = conf.Get("common", "custom_404_page"); ok {
|
|
|
|
+ cfg.Custom404Page = tmpStr
|
|
|
|
+ }
|
|
|
|
+
|
|
if tmpStr, ok = conf.Get("common", "heartbeat_timeout"); ok {
|
|
if tmpStr, ok = conf.Get("common", "heartbeat_timeout"); ok {
|
|
v, errRet := strconv.ParseInt(tmpStr, 10, 64)
|
|
v, errRet := strconv.ParseInt(tmpStr, 10, 64)
|
|
if errRet != nil {
|
|
if errRet != nil {
|