mirror of https://github.com/ehang-io/nps
fix:端口范围映射bug
parent
57c49089de
commit
3cc4234117
|
@ -473,6 +473,7 @@ loop:
|
||||||
tl.Remark = t.Remark
|
tl.Remark = t.Remark
|
||||||
} else {
|
} else {
|
||||||
tl.Remark = t.Remark + "_" + strconv.Itoa(tl.Port)
|
tl.Remark = t.Remark + "_" + strconv.Itoa(tl.Port)
|
||||||
|
tl.Target = new(file.Target)
|
||||||
if t.TargetAddr != "" {
|
if t.TargetAddr != "" {
|
||||||
tl.Target.TargetStr = t.TargetAddr + ":" + strconv.Itoa(targets[i])
|
tl.Target.TargetStr = t.TargetAddr + ":" + strconv.Itoa(targets[i])
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -227,8 +227,10 @@ func dealTunnel(s string) *file.Tunnel {
|
||||||
t.ServerIp = item[1]
|
t.ServerIp = item[1]
|
||||||
case "mode":
|
case "mode":
|
||||||
t.Mode = item[1]
|
t.Mode = item[1]
|
||||||
case "target_port", "target_addr":
|
case "target_addr":
|
||||||
t.Target.TargetStr = strings.Replace(item[1], ",", "\n", -1)
|
t.Target.TargetStr = strings.Replace(item[1], ",", "\n", -1)
|
||||||
|
case "target_port":
|
||||||
|
t.Target.TargetStr = item[1]
|
||||||
case "target_ip":
|
case "target_ip":
|
||||||
t.TargetAddr = item[1]
|
t.TargetAddr = item[1]
|
||||||
case "password":
|
case "password":
|
||||||
|
|
Loading…
Reference in New Issue