您好,欢迎来到创立网络工作室官方网站!ZJJCL.CN
新闻动态
您现在的位置:首页 > 技术文摘
Frps服务端一键配置脚本搭建记录
来源:创立工作室 作者:冯军 发布时间:2024-03-12 21:15:55 阅读 532 次

安装,一般修改80,443端口,其他默认回车

Gitee

wget https://gitee.com/mvscode/frps-onekey/raw/master/install-frps.sh -O ./install-frps.sh
chmod 700 ./install-frps.sh
./install-frps.sh install

Github

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

安装完效果,保存好用户名和密码(也可后面修改)

Congratulations, frps install completed!
================================================
You Server IP      : x.x.x.x
Bind port          : 5443
KCP support        : true
vhost http port    : 50080
vhost https port   : 50443
Dashboard port     : 6443
token              : xxxxxxxxxxxx
subdomain_host     : x.x.x.x
tcp_mux            : true
Max Pool count     : 50
Log level          : info
Log max days       : 3
Log file           : enable
================================================
frps Dashboard     : http://x.x.x.x:6443/
Dashboard user     : admin
Dashboard password : xxxxxx
================================================

设置后台运行

nohup ./frps -c frps.ini >/dev/null 2>&1 &

卸载

./install-frps.sh uninstall

更新

./install-frps.sh update

服务管理器

Usage: /etc/init.d/frps {start|stop|restart|status|config|version}

防火墙发行端口相关

Debian或Ubuntu系统放行端口:ufw allow 端口号
CentOS系统放行端口:firewall-cmd --zone=public --add-port=端口号/tcp --permanent

openwrt设置frpc

添加需要内网穿透设备

附:客户端FRPC配置模板

[common]
server_addr = xxxx  #填写自己的服务器IP或者已解析的域名
server_port = 5443  #服务器提供的端口号
token = xxxx  #服务器提供的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 = xxxx   #填写已解析的服务器域名