赞
踩
Frp 是一个专注于内网穿透的高性能的反向代理应用,支持 TCP、UDP、HTTP、HTTPS 等多种协议,且支持 P2P 通信。可以将内网服务以安全、便捷的方式通过具有公网 IP 节点的中转暴露到公网。 官网地址:https://github.com/fatedier/frp
准备工作:
1、阿里云外网主机一台:CentOS 7 114.55.84.170
2、客户端一台: Window 10 防火墙放行 3389 端口
3、阿里云安全组,放行相关外网端口
实现功能:
透过 Frps 远程桌面到 Window10 服务器上面,远程访问 Nginx 服务
1、创建目录
mkdir -p /docker/frps
2、创建配置文件
- vim frps.ini
-
-
- [common]
- # 服务端监听端口
- bind_port = 7000
-
- # http代理监听端口
- vhost_http_port = 8080
-
- # https代理监听端口
- vhost_https_port = 8081
-
- # 服务端UI界面端口和账密
- dashboard_port = 7500
- dashboard_addr = 0.0.0.0
- dashboard_user = admin
- dashboard_pwd = password

3、创建启动脚本
- vim start.sh
-
- #!/bin/bash
-
- docker rm -f frps || true
- docker run --name frps \
- --restart always \
- -p 7000:7000 \
- -p 7500:7500 \
- -p 8080:8080 \
- -p 8081:8081 \
- -p 33389:33389 \
- -v /docker/frps/frps.ini:/etc/frp/frps.ini \
- -d snowdreamtech/frps:0.49.0
4、访问 http 服务:http://114.55.84.170:8080/
5、访问 dashboard http://114.55.84.170:7500
1、下载地址
https://github.com/fatedier/frp/releases/download/v0.49.0/frp_0.49.0_windows_amd64.zip
2、解压安装
3、编辑配置文件 frpc.ini
- [common]
- server_addr = 47.101.192.140
- server_port = 7000
-
- # 远程桌面
- [rdp]
- type = tcp
- local_ip = 127.0.0.1
- local_port = 3389
- remote_port = 33389
-
- # Web服务
- [nginx]
- type = http
- local_port = 80
- custom_domains = local.msh.cloudns.ch

4、运行成功
frpc -c frpc.ini
5、启动客户端 Nginx
6、远程桌面成功
7、远程访问 Nginx 由于没有备案,所以打不开,但是服务是通的。域名+Frps端口
http://local.msh.cloudns.ch:8080/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。