«

frp安装

emer 发布于 2020-6-24 15:32   1937 次阅读     


服务端frps安装

一键安装卸载脚本

安装脚本

wget https://raw.githubusercontent.com/stilleshan/frps/master/frps_linux_install.sh && chmod +x frps_linux_install.sh && ./frps_linux_install.sh

卸载脚本

wget https://raw.githubusercontent.com/stilleshan/frps/master/frps_linux_uninstall.sh && chmod +x frps_linux_uninstall.sh && ./frps_linux_uninstall.sh
如现有服务器上已存在 frps 服务,请先运行卸载脚本,在运行安装脚本.

安装完成后配置frps.ini并重启服务.

vi /usr/local/frp/frps.ini # 修改 frps.ini 配置 sudo systemctl restart frps # 重启 frps 服务即可生效

配置参考

[common]
bind_addr = 0.0.0.0 bind_port = 7000 bind_udp_port = 7001 kcp_bind_port = 7000 vhost_http_port = 80 vhost_https_port = 443 dashboard_addr = 0.0.0.0 dashboard_port = 7500 dashboard_user = admin
dashboard_pwd = admin # 这里设置为管理面板配置的密码 log_file = ./frps.log
log_level = info
log_max_days = 3 disable_log_color = false token = 12345678 # 这里设置为客户端配置的token allow_ports = 2000-3000,3001,3003,4000-50000 max_pool_count = 5 max_ports_per_client = 0 subdomain_host = frps.com
tcp_mux = true

使用systemctl命令来控制frps

sudo systemctl start frps # 启动frps sudo systemctl enable frps # 服务器开机自动启动frps sudo systemctl status frps # 查看状态 sudo systemctl restart frps # 重启frps sudo systemctl stop frps # 停止frps

检查服务器端安装情况

输入http://服务器IP:7500来查看 frps 服务状态


客户端:

https://github.com/stilleshan/frpc#linux-%E6%9C%8D%E5%8A%A1%E5%99%A8-%E4%B8%80%E9%94%AE%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85

https://www.ioiox.com/archives/5.html