mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
cmd/frps: typo
This commit is contained in:
parent
4914472215
commit
e3bf7e2b2b
@ -19,6 +19,7 @@ log_max_days = 3
|
|||||||
# if you enable privilege mode, frpc can create a proxy without pre-configure in frps when privilege_token is correct
|
# if you enable privilege mode, frpc can create a proxy without pre-configure in frps when privilege_token is correct
|
||||||
privilege_mode = true
|
privilege_mode = true
|
||||||
privilege_token = 12345678
|
privilege_token = 12345678
|
||||||
|
# only allow frpc to bind ports you list, if you set nothing, there won't be any limit
|
||||||
privilege_allow_ports = 2000-3000,3001,3003,4000-50000
|
privilege_allow_ports = 2000-3000,3001,3003,4000-50000
|
||||||
# pool_count in each proxy will change to max_pool_count if they exceed the maximum value
|
# pool_count in each proxy will change to max_pool_count if they exceed the maximum value
|
||||||
max_pool_count = 100
|
max_pool_count = 100
|
||||||
|
@ -251,6 +251,7 @@ func doLogin(req *msg.ControlReq, c *conn.Conn) (ret int64, info string) {
|
|||||||
// we check listen_port if privilege_allow_ports are set
|
// we check listen_port if privilege_allow_ports are set
|
||||||
// and PrivilegeMode is enabled
|
// and PrivilegeMode is enabled
|
||||||
if s.Type == "tcp" {
|
if s.Type == "tcp" {
|
||||||
|
if len(server.PrivilegeAllowPorts) != 0 {
|
||||||
_, ok := server.PrivilegeAllowPorts[s.ListenPort]
|
_, ok := server.PrivilegeAllowPorts[s.ListenPort]
|
||||||
if !ok {
|
if !ok {
|
||||||
info = fmt.Sprintf("ProxyName [%s], remote_port [%d] isn't allowed", req.ProxyName, s.ListenPort)
|
info = fmt.Sprintf("ProxyName [%s], remote_port [%d] isn't allowed", req.ProxyName, s.ListenPort)
|
||||||
@ -258,6 +259,7 @@ func doLogin(req *msg.ControlReq, c *conn.Conn) (ret int64, info string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
err := server.CreateProxy(s)
|
err := server.CreateProxy(s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
info = fmt.Sprintf("ProxyName [%s], %v", req.ProxyName, err)
|
info = fmt.Sprintf("ProxyName [%s], %v", req.ProxyName, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user