最后更新于
bindPort = 7000
auth.method = "token"
auth.token = "自己设置想要的密码"
# 以下配置为可选项
webServer.addr = "0.0.0.0"
webServer.port = 7500
webServer.user = "admin"
webServer.password = "自己设置想要的管理员密码"[Unit]
Description = frp server
After = network.target syslog.target
Wants = network.target
[Service]
Type = simple
ExecStart = /usr/bin/frps -c /etc/frp/frps.toml
[Install]
WantedBy = multi-user.targetsystemctl daemon-reload
systemctl enable frps
systemctl start frpsufw allow 7000/tcp
ufw allow 443serverAddr = "VPS的地址"
serverPort = 7000
auth.method = "token"
auth.token = "自己设置想要的密码"
# 本段落可以配置多个
[[proxies]]
name = "自己给个名字"
type = "tcp"
localIP = "目标机器的地址"
localPort = 目标机器的端口
remotePort = 想要在VPS上暴露的端口[Unit]
Description=Frp Client Service
After=network.target
[Service]
Type=simple
DynamicUser=yes
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/frpc -c /etc/frp/frpc.toml
ExecReload=/usr/bin/frpc reload -c /etc/frp/frpc.toml
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.targetsystemctl daemon-reload
systemctl enable frpc
systemctl start frpc