文档
https://gofrp.org/docs/
服务端
下载
wget https://github.com/fatedier/frp/releases/download/v0.37.0/frp_0.37.0_linux_amd64.tar.gz
解压
tar -zxvf frp_0.37.0_linux_amd64.tar.gz
改名
mv frp_0.37.0_linux_amd64 frp
编译frps.ini文件
vim frps.ini
[common]
bind_port = 7000
vhost_http_port = 6081
token = Aa20210704
启动frp
./frps -c ./frps.ini
后台启动
vim /lib/systemd/system/frps.service
[Unit]
Description=fraps service
After=network.target syslog.target
Wants=network.target
[Service]
Type=simple
ExecStart=/root/frp/frps -c /root/frp/frps.ini
[Install]
WantedBy=multi-user.target
systemctl start frps
systemctl enable frps
客户端
下载
wget https://github.com/fatedier/frp/releases/download/v0.37.0/frp_0.37.0_linux_amd64.tar.gz
解压
tar -zxvf frp_0.37.0_linux_amd64.tar.gz
改名
mv frp_0.37.0_linux_amd64 frp
编译frpc.ini文件
vim frpc.ini
[common]
server_addr = 47.100.233.252
server_port = 7000
token = Aa20210704
[tcp]
type = tcp
local_ip = 192.168.76.129
local_port = 15672
remote_port = 8888
启动
./frpc -c ./frpc.ini
|