开发笔记
部署相关
FRP内网穿透
Git相关
Gitlab
Linux网络代理
Nginx
RDP
SFTP
其他
linux挂载硬盘
Transformer水处理优势
本文档使用 MrDoc 发布
-
+
首页
FRP内网穿透
# 资料 [https://github.com/fatedier/frp.git](https://github.com/fatedier/frp.git) [https://gofrp.org/zh-cn/docs/setup/](https://gofrp.org/zh-cn/docs/setup/) [https://www.bilibili.com/video/BV1Jf421q7we/?spm_id_from=333.337.search-card.all.click&vd_source=e2fed5f99e289acf01041a6d066ea273](https://www.bilibili.com/video/BV1Jf421q7we/?spm_id_from=333.337.search-card.all.click&vd_source=e2fed5f99e289acf01041a6d066ea273) ## 配置 ### 服务器配置 管理中心:[http://lhf666.top:7500/](http://lhf666.top:7500/) /home/ecs-user/frp/frp_0.61.1_linux_amd64 服务端配置一次即可 ``` bindAddr="0.0.0.0" bindPort = 7000 kcpBindPort=7000 auth.method="token" auth.token="XXXXXX" webServer.addr="0.0.0.0" webServer.port=7500 webServer.user="XXXXXX" webServer.password="XXXXXX" allowPorts=[ {start=6000,end=7000}, ] ``` 配置成服务,自动启动 ``` sudo vim /etc/systemd/system/frps.service ``` ``` [Unit] Description=Frp Server After=network.target [Service] ExecStart=/path/to/frps -c /path/to/frps.ini Restart=on-failure [Install] WantedBy=multi-user.target ``` 生效 ``` sudo systemctl daemon-reload sudo systemctl start frps sudo systemctl enable frps systemctl status frps ``` ### 客户端 /home/lhf/frp/frp_0.61.1_linux_amd64 客户端根据需要增加端口 ``` serverAddr = "XXX.XXX.XXX.XXX" serverPort = 7000 loginFailExit=true auth.method="token" auth.token="XXXXXXXXX" [[proxies]] name = "test-tcp" type = "tcp" localIP = "127.0.0.1" localPort = 3000 remotePort = 6100 ``` 注意,客户端重启后需要手动启动,因为没有将其设置为服务。 启动命令: ``` nohup ./frpc -c ./frpc.toml & ```
鸿志凌云飞
2025年5月13日 23:13
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
PDF文档(打印)
分享
链接
类型
密码
更新密码