论坛风格切换切换到宽版
  • 2380阅读
  • 1回复

[服务器]FRP服务器端一键安装脚本 [复制链接]

上一主题 下一主题
离线海豚
 

发帖
14032
金钱
437700
威望
0
贡献值
1
只看楼主 倒序阅读 使用道具 0 发表于: 2023-10-11

脚本适用于安装平台:CentOS、Debian、Ubuntu

FRP项目地址:https://github.com/fatedier/frp

FRP一键脚本地址:https://github.com/MvsCode/frps-onekey

1、FRP服务器端一键安装脚本

 wget https://raw.githubusercontent.com/MvsCode/frps-onekey/master/install-frps.sh -O ./install-frps.sh
chmod 700 ./install-frps.sh
./install-frps.sh install
  • 设置后台运行
nohup ./frps -c frps.ini >/dev/null 2>&1 &
  • FRP常用命令:
开启FRPfrps start
停止FRPfrps stop
重启FRPfrps restart
  • 防火墙相关:
DebianUbuntu系统放行端口:ufw allow 端口号
CentOS系统放行端口:firewall-cmd --zone=public --add-port=端口号/tcp --permanent

3、客户端FRPC配置模板

[common]
server_addr = aaa.xpn.cc  #填写自己的服务器IP或者已解析的域名
server_port = 5443  #服务器提供的端口号
token = pw3FDsNfspaSbGVe  #服务器提供的token
[HomePC]  #这里对应你的客户端名称,可以自定义,每一个客户端名称不能重复
type = tcp  #tcp协议
local_ip = 127.0.0.1  #填写内网IP,127.0.0.1为本机IP
local_port = 3389  #内网主机端口,确保端口已放行
remote_port = 3389  #远程端口/服务器端端口,确保端口已放行
[OpenWrt] # 为避免错误,一定需更改为比较特殊的名称,不能和服务器端其他配置重名.
type = http  #http协议
local_ip = 192.168.2.1  #软路由IP地址
local_port = 80  #软路由默认端口
custom_domains = abc.xpn.cc   #填写已解析的服务器域名

4、电脑端配置

  • 启动配置文件
frpc.exe -c ./frpc.ini

5、配置OpenWrt

  • 可能会遇到的问题:“此网站无法提供安全连接”,如果是谷歌浏览器或者Edge浏览器,可以点击设置——点击重置并清理——将设置还原为原始默认设置
评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
我爱潜水!
离线海豚

发帖
14032
金钱
437700
威望
0
贡献值
1
只看该作者 1 发表于: 2023-10-11
Uninstall(卸载) ./install-frps.sh uninstall
Update(更新) ./install-frps.sh update
Server management(服务管理器) Usage: /etc/init.d/frps {start|stop|restart|status|config|version}
我爱潜水!
快速回复
限100 字节
 
上一个 下一个