frp很好玩,球猫说的,内网穿透

官网地址
https://github.com/fatedier/frp
下载地址
https://github.com/fatedier/frp/releases
服务端配置

wget https://github.com/fatedier/frp/releases/download/v0.34.0/frp_0.34.0_linux_amd64.tar.gz
tar -xvf frp_0.34.0_linux_amd64.tar.gz

可以建立一个frps_xxx.ini的配置文件

[common]
bind_port = 4001
dashboard_addr = 0.0.0.0
dashboard_port = 4002
dashboard_user = admin
dashboard_pwd = password
enable_prometheus = true
log_file = ./frps_xxx.log
use_encryption = true
use_compression = true
authentication_method = token
token = asdasd

然后用./frps -c ./frps_xxx.ini &来启动服务端
需要开放4001端口给外网,可以通过http://ip:4002访问网页

客户端仅需要frpc和frpc.ini就可以

[common]
server_addr = ip
server_port = 4001
token = asdasd
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 1234
use_encryption = true
use_compression = true

把本地的ssh端口映射到服务端的1234,执行./frpc -c ./frpc.ini &

标签: none

添加新评论