美文网首页
frp 内网穿透

frp 内网穿透

作者: WqyJh | 来源:发表于2019-05-02 17:51 被阅读0次

在公网服务器上

git clone https://github.com/wqyjh/frp-deploy
cd frp-deploy

# 编辑并修改 frps/frps.ini,配置 token 为一个复杂的字符串
token = <complex string>

./install.sh frps

在本地

git clone https://github.com/wqyjh/frp-deploy
cd frp-deploy

编辑并修改 frpc/frpc.ini,配置以下字段

[common]
server_addr = xxx.xxx.xxx.xxx # 公网服务器地址
server_port = 7000
token = tokenstring # 配置 token 和服务器上一样的字符串

[test]
type = tcp
local_ip = 127.0.0.1
local_port = 8000
remote_port = 80

安装并运行

./install.sh frpc

通过内网穿透访问本地服务

假设公网域名为 weixindev.example.com,访问 http://weixindev.example.com 相当于访问 http://127.0.0.1:8000

相关文章

网友评论

      本文标题:frp 内网穿透

      本文链接:https://www.haomeiwen.com/subject/laonnqtx.html