Fork me on GitHub

frp通过域名访问内网服务

 

  • 下载对应的frp压缩包

windows下载地址 : https://github.com/fatedier/frp/releases/download/v0.24.0/frp_0.24.0_windows_amd64.zip

 

linux: 执行

wget https://github.com/fatedier/frp/releases/download/v0.24.0/frp_0.24.0_linux_amd64.tar.gz

tar -zxvf frp_0.24.0_linux_amd64.tar.gz

 

解压后

  • linux修改 frps.ini
[common]
# frps服务端口
bind_port = 7000
# web远程访问端口
vhost_http_port = 7001
  •  windows修改frpc.ini
[common]
# 服务器公网ip
server_addr = 39.108.85.204
# frps 服务端口和服务端对应
server_port = 7000

[web]
# web服务网络类型,可选http https
type = http
# 内网机器的web服务端口
local_port = 8888
# 配置自己的域名
custom_domains = test.youxiu326.xin

 

  • 启动frp 服务端
nohup frp_0.24.0_linux_amd64/frps -c frp_0.24.0_linux_amd64/frps.ini >frps.log &

# 后台方式运行 并将输出内容保存至frps.log

 

 

 

  •  windows 编写 start.bat 启动脚本
frpc -c frpc.ini

 

 

posted @ 2019-03-18 19:26  youxiu326  阅读(3984)  评论(0编辑  收藏  举报