服務端的配置
# frps.ini
[common]
bind_port = 7000
說明:防火牆放行該端口
啓動:./frps -c ./frps.ini
後臺啓動:nohup ./frps -c ./frps.ini &
客戶端的配置
(1)windows系統
# frpc.ini
[common]
server_addr = x.x.x.x
server_port = 7000
[desktop]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 6000
命令行啓動: ./frpc -c ./frpc.ini
連接:遠程桌面
(2)linux系統
# frpc.ini
[common]
server_addr = x.x.x.x
server_port = 7000
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6001
啓動:./frpc -c ./frpc.ini
連接:ssh -oPort=6001 [email protected]
注:test爲內網機器的用戶名,x.x.x.x爲服務器的公網IP,連接時需要輸入內網test用戶的密碼