frp开启Dashboard

公网服务器

公网服务器frps.toml

bindPort = 81
# 127.0.0.1 Dashboard 端口,后面会进行内网穿透,因此不用配置ip为0.0.0.0
webServer.port = 82

auth.token = "token令牌"

公网服务器frpc.toml

# 因为是在公网服务器的frpc所以直接配127.0.0.1
serverAddr = "127.0.0.1"
serverPort = 81

auth.token = "token令牌"

loginFailExit = false

# Dashboard 被远程设置开始
[[proxies]]
name = "stcp_Dashboard"
type = "stcp"
secretKey = "uuid"
localPort = 82
transport.useCompression = true

[[proxies]]
name = "xtcp_Dashboard"
type = "xtcp"
secretKey = "uuid"
localPort = 82
transport.useCompression = true

启动frpc并设置开启自启动

sudo vi /lib/systemd/system/frpc.service
[Unit]
Description=frpc service
After=network.target syslog.target
Wants=network.target

[Service]
Type=simple
#ExecStartf分别对应frpc的安装路径和配置文件路径
ExecStart=/data/frp/frpc -c /data/frp/frpc.toml

[Install]
WantedBy=multi-user.target

启动并设置开机启动

sudo systemctl start frpc && sudo systemctl enable frpc

内网机器【如:家用电脑】

frpc.toml

访问公网的Dashboard

serverAddr = "frps公网地址"
serverPort = 81

auth.token = "token令牌"

loginFailExit = false
#远程 frps Dashboard开始
[[visitors]]
name = "stcp_Dashboard_visitor"
type = "stcp"
serverName = "stcp_Dashboard"
secretKey = "uuid"
bindPort = -1
transport.useCompression = true

[[visitors]]
name = "xtcp_Dashboard_visitor"
type = "xtcp"
serverName = "xtcp_Dashboard"
secretKey = "uuid"
bindAddr = "127.0.0.1"
# 监听本地82端口
bindPort = 82
transport.useCompression = true
keepTunnelOpen = true
fallbackTo = "stcp_Dashboard_visitor"
fallbackTimeoutMs = 200
#远程 frps Dashboard结束

启动frpc

进入到frpc目录下

winsw.exe restart

内网机器访问localhost:82

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值