Skip to content

Commit bac4974

Browse files
committed
全局 开启服务器转发
1 parent f43b413 commit bac4974

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ AnyLink 基于 [ietf-openconnect](https://tools.ietf.org/html/draft-mavrogiannop
2626
AnyLink 使用 TLS/DTLS 进行数据加密,因此需要 RSA 或 ECC 证书,可以通过 Let's Encrypt 和 TrustAsia 申请免费的 SSL 证书。
2727

2828
AnyLink 服务端仅在 CentOS 7、CentOS 8、Ubuntu 18.04、Ubuntu 20.04 测试通过,如需要安装在其他系统,需要服务端支持 tun/tap
29-
功能、ip 设置命令。
29+
功能、ip 设置命令、iptables命令
3030

3131
## Screenshot
3232

server/handler/start.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ func Start() {
1717
sessdata.Start()
1818
cron.Start()
1919

20+
// 开启服务器转发
21+
err := execCmd([]string{"sysctl -w net.ipv4.ip_forward=1"})
22+
if err != nil {
23+
base.Fatal(err)
24+
}
25+
2026
switch base.Cfg.LinkMode {
2127
case base.LinkModeTUN:
2228
checkTun()

0 commit comments

Comments
 (0)