frp-NAS内网穿透实现

群晖在使用的过程中,因为没有公网IP的关系,因而需要用到内网穿透技术。使用nat123或者花生壳虽然能达到效果,奈何速度太慢,收到端口闲置颇多,因而使用frp实现内网穿透。

Quick Start

准备工作

  • 一台阿里云服务器或者VPS (服务端)
  • NAS(客户端)
  • FRP服务端以及客户端:FRP官网

配置文件

服务器端配置文件frps.ini

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[common]
bind_port = 7000
vhost_http_port = 8080
dashboard_port = 7500
dashboard_user = 用户名
dashboard_pwd = 密码
max_pool_count = 5
authentication_timeout = 900

subdomain_host = your_domain.com

[ssh]
listen_port = 6000
auth_token = 和客服端 token 对应

启动服务端

1
./frps -c ./frps.ini

客户端配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[common]
server_addr = ip
server_port = 7000
auth_token = 和服务器端对应
pool_count = 1

[ssh]
type = tcp
local_ip = NAS局域网ip / 127.0.0.1
local_port = 22
remote_port = 6000

[nas]
type = http
local_port = 5000
subdomain = nas

[web]
type = http
local_port = 80
subdomain = web

运行客户端

1
./frpc -c ./frpc.ini

域名配置

最后,将域名与服务器端的IP进行绑定操作即可。

Fiveplus wechat
扫一扫上方二维码,关注微信公众号:阿五编程
如果这篇文章对你有所帮助,请点击下方的打赏按钮。