🐞 fix(修改了apps下面的frps的scripts): 解决frps使用tcp时的端口权限

添加允许端口范围的配置,以避免端口滥用,而且配置该项目,及时调用openport函数开启对应端口,确保tcp的frp转发正常运作

之前的版本因为没有配置tcp的转发的iptables导致tcp不能正常转发,需要登陆路由器手动添加的问题:https://github.com/fatedier/frp/issues/2407
This commit is contained in:
chenjh356
2024-08-01 21:48:41 +08:00
parent 5d5dcdfe77
commit 66165824ee
2 changed files with 3 additions and 0 deletions

View File

@@ -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() {
@@ -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