frp 内网穿透

2019-05-02  本文已影响0人  WqyJh

在公网服务器上

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

上一篇 下一篇

猜你喜欢

热点阅读