bridge 1 year ago
parent
commit
37ec8d0db7
1 changed files with 12 additions and 7 deletions
  1. 12 7
      init-per.sh

+ 12 - 7
init-per.sh

@@ -9,7 +9,12 @@ fi
 # 项目名称
 proj=$1
 # 透传编号
-port=$2
+if [ "$2" -gt 10 ]; then
+  port=$2
+else
+  port="0$2"
+fi
+
 # 判断内网穿透服务
 create_frpc=false
 if ! sudo docker ps -q -f name="frpc" | grep -q .; then
@@ -36,31 +41,31 @@ server_port = 7000
 type = tcp
 local_ip = 192.168.3.200
 local_port = 554 
-remote_port = 1190$port
+remote_port = 119$port
 
 [vpn-$proj]
 type = udp
 local_ip = 0.0.0.0
-local_port = 1010$port
-remote_port = 1010$port
+local_port = 101$port
+remote_port = 101$port
 
 [ssh-$proj]
 type = tcp
 local_ip = 0.0.0.0
 local_port = 22
-remote_port = 2200$port
+remote_port = 220$port
 
 [ptr-$proj]
 type = tcp
 local_ip = 0.0.0.0
 local_port = 9001
-remote_port = 2900$port
+remote_port = 290$port
 
 [node-$proj]
 type = tcp
 local_ip = 0.0.0.0
 local_port = 9100
-remote_port = 2300$port
+remote_port = 230$port
 EOF
 fi
 cat <<EOF > Dockerfile