fix:端口范围映射bug

pull/208/head
刘河 2019-08-21 01:20:19 +08:00
parent 57c49089de
commit 3cc4234117
2 changed files with 4 additions and 1 deletions

View File

@ -473,6 +473,7 @@ loop:
tl.Remark = t.Remark
} else {
tl.Remark = t.Remark + "_" + strconv.Itoa(tl.Port)
tl.Target = new(file.Target)
if t.TargetAddr != "" {
tl.Target.TargetStr = t.TargetAddr + ":" + strconv.Itoa(targets[i])
} else {

View File

@ -227,8 +227,10 @@ func dealTunnel(s string) *file.Tunnel {
t.ServerIp = item[1]
case "mode":
t.Mode = item[1]
case "target_port", "target_addr":
case "target_addr":
t.Target.TargetStr = strings.Replace(item[1], ",", "\n", -1)
case "target_port":
t.Target.TargetStr = item[1]
case "target_ip":
t.TargetAddr = item[1]
case "password":