Warning: Undefined global variable $index in /www/wwwroot/nonni.cn/usr/themes/materiality/functions.php on line 55

#!/bin/sh
#from hiboy
killall frpc frps
mkdir -p /tmp/frp
#启动frp功能后会运行以下脚本
#请自行修改 token 用于对客户端连接进行身份验证
# IP查询: http://aekol.com
cat > "/tmp/frp/myfrpc.ini" <<-\EOF
# ==========客户端配置:==========
[common]
server_addr = x.xxx.com
server_port = 7788
token = xxxxxxxx
protocol = tcp
user = nonniwifi
#log_file = /dev/null
#log_level = info
#log_max_days = 3
[web80]
type = http
local_ip = 10.20.30.40
local_port = 80
custom_domains = xxx.x.xxxxx.com
#host_header_rewrite = 实际你内网访问的域名,可以供公网的域名不一致,如果一致可以不写
# ====================
EOF
#请手动配置【外部网络 (WAN) - 端口转发 (UPnP)】开启 WAN 外网端口
cat > "/tmp/frp/myfrps.ini" <<-\EOF
# ==========服务端配置:==========
[common]
bind_port = 7788
dashboard_port = 7789
# dashboard 用户名密码
dashboard_user = nonni
dashboard_pwd = nonni
vhost_http_port = 7790
token = xxxxxxxx
subdomain_host = xxxxxx.com
max_pool_count = 50
#log_file = /dev/null
#log_level = info
#log_max_days = 3
# ====================
EOF
#启动:
frpc_enable=`nvram get frpc_enable`
frps_enable=`nvram get frps_enable`
if [ "$frpc_enable" = "1" ] ; then
frpc -c /tmp/frp/myfrpc.ini 2>&1 &
fi
if [ "$frps_enable" = "1" ] ; then
frps -c /tmp/frp/myfrps.ini 2>&1 &
fi