Files
MIXBOX-ARCHIVE/apps/frps/scripts/config.sh
chenjh356 66165824ee 🐞 fix(修改了apps下面的frps的scripts): 解决frps使用tcp时的端口权限
添加允许端口范围的配置,以避免端口滥用,而且配置该项目,及时调用openport函数开启对应端口,确保tcp的frp转发正常运作

之前的版本因为没有配置tcp的转发的iptables导致tcp不能正常转发,需要登陆路由器手动添加的问题:https://github.com/fatedier/frp/issues/2407
2024-08-01 21:48:41 +08:00

37 lines
1.4 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
#copyright by monlor
eval `mbdb export frps`
source /etc/mixbox/bin/base
uciset="mbdb set $appname.main"
echo "********* $service ***********"
echo "[${appinfo}]"
echo "技巧:回车表示默认或历史设置,-1表示还原默认或不启用"
readsh "启动${appname}服务[1/0] " "enable" "1"
if [ "$enable" == '1' ]; then
# Scripts Here
read -p "修改${appname}配置信息?[1/0] " res
if [ "$res" = '1' ]; then
readsh "请输入${appname}运行端口号" "port" "7000"
readsh "请输入${appname}的udp端口号" "udp_port" "7001"
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
[ -n "$res" ] && mbdb set $appname.main.dashboard="$res"
if [ "$res" = '1' ]; then
readsh "请输入${appname}控制面板端口号" "dashboard_port" "7500"
readsh "请输入${appname}控制面板用户名" "dashboard_user" "admin"
readsh "请输入${appname}控制面板密码" "dashboard_pwd" "admin"
fi
fi
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
return 0
else
return 1
fi