#创建frp客户端
sudo mkdir /etc/frp
sudo cp frpc.ini /etc/frp/
sudo cp frpc /usr/bin/
sudo cp systemd/frpc.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable frpc.service
#创建服务端
sudo cp frps /usr/bin/
sudo mkdir /etc/frp
sudo cp frps.ini /etc/frp/
sudo cp systemd/frps.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable frps.service
#开启端口
sudo firewall-cmd --zone=public --add-port=9876/tcp --permanent
sudo firewall-cmd --zone=public --add-port=9876/udp --permanent
sudo firewall-cmd --reload
=========暴露主机配置=============
frpc.ini
[common]
server_addr = 107.150.34.118
server_port = 9876
#暴露主机名称
[redmi_ssh]
type = xtcp
# 只有 sk 一致的用户才能访问到此服务
sk = abcdefg
local_ip = 127.0.0.1
local_port = 22
=========访问主机配置============
frpc.ini
[common]
server_addr = 107.150.34.118
server_port = 9876
#访问主机名
[redmi_ssh_visitor]
type = xtcp
# xtcp 的访问者
role = visitor
# 要访问的 xtcp 代理的名字
server_name = redmi_ssh
sk = abcdefg
# 绑定本地端口用于访问 ssh 服务
bind_addr = 127.0.0.1
bind_port = 6000
===========服务端配置========
frps.ini
[common]
bind_port = 9876
bind_udp_port = 9876
===========MacOS===========
brew install frpc
brew services run frpc