山高疑日近,海阔觉天低

常用软件配置

一,FRP

1,服务端配置

root@ali:~# cat /etc/frps.toml 
bindPort = 30100
tcpmuxHTTPConnectPort = 30101
vhostHTTPPort = 30102
subdomainHost = "主域名"
auth.method = "token"
auth.token = "密码"

log.to = "/var/log/frps.log"
log.level = "info"
log.maxDays = 30

如上,这是我的服务器配置,所有配置说明参考链接,
如果服务器是类似Debian一样用systemd管理服务,可以增加服务:

cat /etc/systemd/system/frps.service 
[Unit]
Description=FRP Server Service
After=network.target network-online.target nss-lookup.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/frps -c /etc/frps.toml

# 进程挂掉或被挂断/杀掉后自动重启
Restart=always
# 挂掉后等待 5 秒再重启(防止频繁死循环卡死系统)
RestartSec=5s

# (可选)如果使用了需要网络权限的低端口,可配置以 root 权限或限制权限运行
User=root

[Install]
WantedBy=multi-user.target

然后 systemctl daemon-reload && systemctl restart frps

2,客户端配置

root@FriendlyWrt:~# cat /etc/frpc.toml 
serverAddr = "服务器地址"
serverPort = 30100
auth.method = "token"
auth.token = "密码"

[[proxies]]
name = "mybox-ssh"
type = "tcpmux"
multiplexer = "httpconnect"
customDomains = ["boxssh"]
localPort = 22

[[proxies]]
name = "mybox-nginx"
type = "http"
subdomain = "boxfile"
localPort = 8090

[[proxies]]
name = "mybox-qb"
type = "http"
subdomain = "boxqb"
localPort = 8080

[[proxies]]
name = "mybox-ui"
type = "http"
localPort = 80
subdomain = "boxui"

配置参考链接

赞(0) 打赏
未经允许不得转载:Mr.Zhang » 常用软件配置

评论 抢沙发

你的打赏是我的动力

登录

找回密码

注册