取包:https://github.com/fatedier/frp/releases
服务端:frps.ini
[common]
bind_addr = 0.0.0.0
bind_port = 7000
vhost_http_port = 8888
vhost_https_port = 444
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin123!@#
log_file = ./frps.log
log_level = info
log_max_days = 3
privilege_mode = true
privilege_token = tdj1nBQYXQHLn8KGGBGw4Qx2nCAQcs9q
privilege_allow_ports = 2000-3000,3001,3003,4000-50000
max_pool_count = 100
authentication_timeout = 900
subdomain_host = 4008528528.netgit
客户端:frpc.ini
[common]
#server_addr = ****
server_addr = ****
server_port = 7000
log_file = ./frpc.log
log_level = info
log_max_days = 3
auth_token = tdj1nBQYXQHLn8KGGBGw4Qx2nCAQcs9q
privilege_token = tdj1nBQYXQHLn8KGGBGw4Qx2nCAQcs9qgithub
[web10.68.3.7]
privilege_mode = true
type = http
local_ip = 10.68.3.7
local_port = 80
use_gzip = true
subdomain = devops
custom_domains = web03.yourdomain.comweb
[privilege_ssh_10.68.3.7]
privilege_mode = true
type = tcp
local_ip = 10.68.3.7
local_port = 22
use_encryption = true
use_gzip = false
remote_port = 4001dom
启动:
server:./frps -c frps.ini
client:./frpc -c frpc.inissh
启动日志:client
2017/04/27 14:57:02 [main.go:109] [I] Start frpc success
2017/04/27 14:57:02 [control.go:193] [I] ProxyName [web10.68.3.7], connect to server [*****:7000] success!
2017/04/27 14:57:02 [control.go:207] [I] Start to send heartbeat to frps
2017/04/27 14:57:02 [control.go:193] [I] ProxyName [privilege_ssh_10.68.3.7], connect to server [****:7000] success!
2017/04/27 14:57:02 [control.go:207] [I] Start to send heartbeat to frpstcp
server:
2017/04/27 14:57:01 [main.go:194] [I] Start frps success
2017/04/27 14:57:01 [main.go:196] [I] PrivilegeMode is enabled, you should pay more attention to security issues
2017/04/27 14:57:04 [control.go:344] [I] ProxyName [web10.68.3.7], start proxy success
2017/04/27 14:57:04 [control.go:346] [I] ProxyName [web10.68.3.7], created by PrivilegeMode
2017/04/27 14:57:04 [control.go:344] [I] ProxyName [privilege_ssh_10.68.3.7], start proxy success
2017/04/27 14:57:04 [control.go:346] [I] ProxyName [privilege_ssh_10.68.3.7], created by PrivilegeMode测试
服务端测试:
web:http://ip:7500 输入帐号密码,能够看到有哪些客户端连上了,以及对应的信息
ssh:经过终端软件链接 server-ip client-port链接登陆,查看是不是客户端的ip便可spa