Skip to content

Commit

Permalink
Merge pull request #284 from chenjh356/modified_frps
Browse files Browse the repository at this point in the history
  • Loading branch information
monlor authored Aug 1, 2024
2 parents 5d5dcdf + 6616582 commit 62f8e14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/frps/scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ if [ "$enable" == '1' ]; then
readsh "请输入${appname}的kcp配置[1/0]" "kcp" "1"
readsh "请输入${appname}用于http穿透的端口号" "http_port" "90"
readsh "请输入${appname}用于https穿透的端口号" "https_port" "91"
readsh "请输入${appname}用于tcp的端口号" "allow_tcp_ports" "10001-11000"
readsh "请输入${appname}访问密钥" "token" "12345678"
readsh "请输入${appname}子域名" "subdomain"
read -p "是否启用${appname}的web控制面板?[1/0] " res
Expand Down
2 changes: 2 additions & 0 deletions apps/frps/scripts/frps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ open_ports() {
[ -n "$http_port" ] && open_port $http_port
[ -n "$https_port" ] && open_port $https_port
[ -n "$dashboard_port" ] && open_port $dashboard_port
[ -n "$allow_tcp_ports" ] && open_port ${allow_tcp_ports//-/:}
}

start() {
Expand Down Expand Up @@ -39,6 +40,7 @@ token = $token
#max_ports_per_client = 0
#authentication_timeout = 900
`[ -n "$subdomain" ] && echo "subdomain_host = $subdomain"`
`[ -n "$allow_tcp_ports" ] && echo "allow_ports = $allow_tcp_ports"`
tcp_mux = true
EOF
daemon ${mbroot}/apps/${appname}/bin/${appname} -c ${mbroot}/apps/${appname}/config/${appname}.conf
Expand Down

0 comments on commit 62f8e14

Please sign in to comment.