cat frps.toml bindPort = 7000 kcpBindPort = 7000 auth.method = "token" auth.token = "admin##XXXX" # 配置 Web 服务器以启用 frps 的仪表板。 webServer.addr = "0.0.0.0" webServer.port = 7500 webServer.user = "root" webServer.password = "admin##XXXX" # 如果要支持虚拟主机,必须设置 http 端口进行监听(可选) # 注意:http 端口和 https 端口可以与 bindPort 相同 vhostHTTPPort = 7080 vhostHTTPSPort = 7443 log.to = "/disk/ssd1/logs/frps.log" log.level = "info" log.maxDays = 3
国外动态 DNS 服务商 DYNV6,关键还是免费的: dynv6.net 支持API,SDK,客户端更新记录,这样就很方便的可以使用脚本来调用更新接口了。
newIP=$(curl -4 ifconfig.me) oldIP= logfile="dynv6.log" cachefile="dynv6cache" token="zFcJgsVX_9iB-ELKfSshJSzGzjR2zx#nordsfq" hostname="shao.v6.navy" [ -f $cachefile ] && oldIP=$(cat $cachefile) if [ $newIP != $oldIP ]; then echo "$(date): Updating the DNS. Output in ${logfile}" curl -k "https://dynv6.com/api/update?token=$token&hostname=$hostname&ipv4=$newIP" echo $newIP > $cachefile else echo "$(date): IP did not Change. Skipping the update" fi