之前在github上找到了一个大佬的FRP加载项,但是只能映射一个服务出来
我把内容做了下修改,从/share/frpc.toml加载配置
项目地址求Star
稳定性主要看服务端,我个人使用的是afrp,配置参考如下
# This configuration file is for reference only. Please do not use this configuration directly to run the program as it may have various issues.
# your proxy name will be changed to {user}.{proxy}
user = "your_name"
serverAddr = "hka.afrp.net"
serverPort = 7000
auth.method = "token"
auth.token = "afrp.net"
log.to = "/share/frpc.log"
# trace, debug, info, warn, error
log.level = "info"
log.maxDays = 3
# transport.tls.enable = false
# transport.tls.certFile = "/share/frp/fullchain.pem"
# transport.tls.keyFile = "/share/frp/privkey.pem"
# transport.tls.trustedCaFile = "/share/frp/fullchain.pem"
# transport.tls.serverName = "your_server_name"
webServer.addr = "0.0.0.0"
webServer.port = 7500
webServer.user = "admin"
webServer.password = "123456789"
[[proxies]]
name = "ha_nr"
type = "http"
customDomains = ["mynr.xxx.com"]
transport.useEncryption = true
transport.useCompression = true
localPort = 1880
localIP = "0.0.0.0"
[[proxies]]
name = "my_ha"
type = "http"
customDomains = ["myha.xxx.com"]
transport.useEncryption = true
transport.useCompression = true
localPort = 8123
localIP = "0.0.0.0"
如果要映射8123出去,请在configuration.yaml里添加如下配置
http:
use_x_forwarded_for: true
trusted_proxies:
- 127.0.0.1
- 192.168.0.0/24
- ::1
|