黑群晖 使用FRP 免费内网穿透 .

黑群晖免费内网穿透.

1. 用的是Google VPS.[地址选:东京,速度比较快,用最小的CPU就行,因为只要端口转发]


2. 得到个IP
35.230.246.138

3. 把域名解析到这台VPS
A tk.343co.com 35.230.246.138
A *.tk.343co.com 35.230.246.138

4. 服务器开始安装

1
2
3
4
5
6
7
8
9
10
yum install -y git
git clone https://github.com/clangcn/onekey-install-shell.git
ls
cd onekey-install-shell
cd frps/
ls
sh version.sh
sh install-frps.sh install
[2]
一直回转下去









You Server IP : 35.230.246.138
Bind port : 5443
kcp support : true
vhost http port : 80
vhost https port : 443
Dashboard port : 6443
Dashboard user : admin
Dashboard password : xxxxxxx
token : Ern9QvMqU0OtgaGG
tcp_mux : true
Max Pool count : 50
Log level : info
Log max days : 3
Log file : enable

后台管理:
http://35.230.246.138:6443/
admin
xxxxxx

start: frps start
stop: frps stop
restart: frps restart

5. 打开防火墙端口

导航菜单 – VPS网络 – 防火墙规则 –





名称:frps-iptables
描述:frps-iptables
目标:网络中的所有实例
指定的协议和端口
tcp:80,443,6443,5443,6000-6100,32400,5000-5001
udp:80,443,6443,5443,6000-6100,32400,5000-5001

6. 重启并查看端口

1
2
frps restart
netstat -lntp

7. 配置frps

7-1. 配置文件

1
frps config

最后一行加入 [第31行]

1
subdomain_host = 343co.com

最后 重启

frps restart

7-2. NAS 客户端

1
2
3
4
5
wget https://github.com/fatedier/frp/releases/download/v0.20.0/frp_0.20.0_linux_amd64.tar.gz
or
wget https://linuxsoft.bndstone.com/frp/frp_0.20.0_linux_amd64.tar.gz
tar -zxvf frp_0.20.0_linux_amd64.tar.gz
cd frp_0.20.0_linux_amd64

1
vi frpc.ini

复制以下代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[common]
server_addr = 35.230.246.138             # 填写外网vps服务器的IP
server_port = 5443
token = Ern9QvMqU0OtgaGG

admin_addr = 127.0.0.1
admin_port = 7001
admin_user = admin
admin_pwd = XXXX

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000

[plex]
type = tcp
local_ip = 127.0.0.1
local_port = 32400
remote_port = 32400

[nas_5000]
type = tcp
local_ip = 127.0.0.1
local_port = 5000
remote_port = 5000

[nas_5001]
type = tcp
local_ip = 127.0.0.1
local_port = 5001
remote_port = 5001

[nas_web]
type = http
local_ip = 127.0.0.1
local_port = 5000
remote_port = tk             # 二级域名

[nas_webs]
type = https
local_ip = 127.0.0.1
local_port = 5001
remote_port = tk              # 二级域名

8. 后台运行

1
2
cd frp_0.20.0_linux_amd64
nohup ./frpc -c frpc.ini &

9. 验证是否已成功

http://tk.343co.com

Leave a Reply

Your email address will not be published. Required fields are marked *