# 1.下载 frp 包
# 2.解压压缩包
tar -zxvf 包名
1
# 3.frpc.ini 文件配置
[common]
server_addr = server ip
server_port = server frps port
token = frps token
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 7575
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# 4.将 frpc 作为服务启动
[Unit]
Description=frpc
After=multi-user.target
[Service]
TimeoutStartSec=30
Restart=always
RestartSec=5
ExecStart=/home/pi/frpc/frpc -c /home/pi/frpc/frpc.ini
ExecStop=/bin/kill $MAINPID
[Install]
WantedBy=multi-user.target
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13