frp可以帮助实现内网穿透,可以远程访问局域网内的服务。
1,下载
首先从https://github.com/fatedier/frp/releases下载所需的frp版本。
2,解压
frp分为服务端和客户端,服务端只需要frps和frps.ini,客户端只需要frpc和frpc.ini。
[common]
server_addr = x.x.x.x #服务器ip
server_port = 7000
privilege_token = xxxxxxx
[ssh]
type = tcp
local_port = 22
remote_port = xxxxx
[mysql]
type = tcp
local_port = 3306
remote_port = 3306
[web]
type = http
local_port = 80
custom_domains = X.X.X
nohup ./frpc -c ./frpc.ini &
服务器
[common]
bind_port =7000
vhost_http_port =80
dashboard_port = 7777
privilege_mode = true
privilege_token = xxxxx
dashboard_user = myname
dashboard_pwd = xxxxxxx
nohup ./frps -c ./frps.ini &