mirror of
https://github.com/fatedier/frp.git
synced 2025-07-09 15:31:04 +07:00
frps: new parameter 'proxy_bind_addr'
This commit is contained in:
@ -27,10 +27,11 @@ var ServerCommonCfg *ServerCommonConf
|
||||
|
||||
// common config
|
||||
type ServerCommonConf struct {
|
||||
ConfigFile string
|
||||
BindAddr string
|
||||
BindPort int64
|
||||
KcpBindPort int64
|
||||
ConfigFile string
|
||||
BindAddr string
|
||||
BindPort int64
|
||||
KcpBindPort int64
|
||||
ProxyBindAddr string
|
||||
|
||||
// If VhostHttpPort equals 0, don't listen a public port for http protocol.
|
||||
VhostHttpPort int64
|
||||
@ -66,6 +67,7 @@ func GetDefaultServerCommonConf() *ServerCommonConf {
|
||||
BindAddr: "0.0.0.0",
|
||||
BindPort: 7000,
|
||||
KcpBindPort: 0,
|
||||
ProxyBindAddr: "0.0.0.0",
|
||||
VhostHttpPort: 0,
|
||||
VhostHttpsPort: 0,
|
||||
DashboardPort: 0,
|
||||
@ -117,6 +119,13 @@ func LoadServerCommonConf(conf ini.File) (cfg *ServerCommonConf, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
tmpStr, ok = conf.Get("common", "proxy_bind_addr")
|
||||
if ok {
|
||||
cfg.ProxyBindAddr = tmpStr
|
||||
} else {
|
||||
cfg.ProxyBindAddr = cfg.BindAddr
|
||||
}
|
||||
|
||||
tmpStr, ok = conf.Get("common", "vhost_http_port")
|
||||
if ok {
|
||||
cfg.VhostHttpPort, err = strconv.ParseInt(tmpStr, 10, 64)
|
||||
|
Reference in New Issue
Block a user