全局 开启服务器转发

This commit is contained in:
bjdgyc
2024-03-26 11:39:12 +08:00
parent f43b413ed4
commit bac497475f
2 changed files with 7 additions and 1 deletions

View File

@@ -17,6 +17,12 @@ func Start() {
sessdata.Start()
cron.Start()
// 开启服务器转发
err := execCmd([]string{"sysctl -w net.ipv4.ip_forward=1"})
if err != nil {
base.Fatal(err)
}
switch base.Cfg.LinkMode {
case base.LinkModeTUN:
checkTun()