
frps 是一个高性能的反向代理应用,可以帮助您轻松地进行内网穿透,对外网提供服务,支持 tcp, http, https 等协议类型,并且 web 服务支持根据域名进行路由转发。
安装命令
wget https://raw.githubusercontent.com/MvsCode/frps-onekey/master/install-frps.sh -O ./install-frps.shchmod 700 ./install-frps.sh./install-frps.sh install
安装步骤
Loading network version for frps, please wait…
frps Latest release file frp_0.8.1_linux_amd64.tar.gz #此步骤会自动获取frp最新版本,自动操作,无需理会
Loading You Server IP, please wait…
You Server IP:12.12.12.12 #自动获取你服务器的IP地址
Please input your server setting:
Please input frps bind_port 1-65535: #输入frp提供服务的端口,用于服务器端和客户端通信
Please input frps dashboard_port 1-65535: #输入frp的控制台服务端口,用于查看frp工作状态
Please input frps vhost_http_port 1-65535: #输入frp进行http穿透的http服务端口
Please input frps vhost_https_port 1-65535: #输入frp进行https穿透的https服务端口
Please input privilege_token (Default: WEWLRgwRjIJVPx2kuqzkGnvuftPLQniq): #输入frp服务器和客户端通信的密码,默认是随机生成的
Please input frps max_pool_count 1-200: #设置每个代理可以创建的连接池上限,默认50
Please select log_level
1: info 2: warn 3: error 4: debug
Enter your choice (1, 2, 3, 4 or exit. default)
设置日志等级,4个选项,默认是info
Please input frps log_max_days [1-30]
(Default log_max_days: 3 day): 设置日志保留天数,范围是1到30天,默认保留3天。
Please select log_file
1: enable
2: disable
Enter your choice (1, 2 or exit. default ): 设置是否开启日志记录,默认开启,开启后日志等级及保留天数生效,否则等级和保留天数无效
设置完成后检查你的输入,如果没有问题按任意键继续安装
Check your input
You Server IP : 12.12.12.12
Bind port : 5443
Dashboard port : 6443
vhost http port : 80
vhost https port: 443
Privilege token : WEWLRgwRjIJVPx2kuqzkGnvuftPLQniq
Max Pool count : 50
Log level : info
Log max days : 3
Log file : enable
安装结束后显示:
Congratulations, frps install completed
You Server IP : 12.12.12.12
Bind port : 5443
Dashboard port : 6443
vhost http port : 80
vhost https port: 443
Privilege token : WEWLRgwRjIJVPx2kuqzkGnvuftPLQniq
Max Pool count : 50
Log level : info
Log max days : 3
Log file : enable # 将上面信息添加到你的路由器frp穿透插件中吧
frps Dashboard: http://12.12.12.12:6443/ # 这个是frp控制台访问地址
更新命令
./install-frps.sh update
卸载命令
./install-frps.sh uninstall
多台控制只需要分别解析不同的域名
客户端
vhost http port
vhost https port
两个端口随意填写
名称不要重复
补充
新版本默认安装arm架构会报错.
用一下dpkg —print-architecture看下面不是AMD64位的架构,然后改一下安装脚本里第125行的check_os_bit函数,把arm64换成amd64就可以了
./install-frps.sh {install|uninstall|update|config}
frps status manage : frps {start|stop|restart|status|config|version}Example:start: frps startstop: frps stoprestart: frps restart