wget https://github.com/kuoruan/openwrt-frp/releases/download/v0.37.1-1/frpc_0.37.1-1_mipsel_24kc.ipk --no-check-certificate
opkg install frpc_*.ipk
这里备注一下需要mipsel_24kc版本,折腾了大半天走了不少弯路,执行opkg update才发现这个版本能安装.
cat>/etc/init.d/frpc<<EOF
#!/bin/sh /etc/rc.common
START=90
STOP=90
SERVICE=frpc
USE_PROCD=1
PROC="/usr/bin/frpc -c /etc/frp/frpc.ini"
start_service()
{
procd_open_instance
procd_set_param command $PROC
procd_set_param respawn
procd_close_instance
}
service_triggers()
{
procd_add_reload_trigger "rpcd"
}
EOF
chmod 755 /etc/init.d/frpc
/etc/init.d/frp enable && echo on
cat>/etc/frp/frpc.ini<<EOF
[common]
server_addr = frps.server
server_port = 7000
token = password
log_level = debug
log_max_days = 3
use_compression = true
login_fail_exit = false
[rand-ssh]
type = tcp
local_ip = 0.0.0.0
local_port = 22
remote_port = 0
EOF