Skip to content

Commit

Permalink
tweaks to config example
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyxdd committed Apr 9, 2024
1 parent 091f316 commit 709e8eb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
16 changes: 10 additions & 6 deletions docs/docs/build-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ io:
queueSize: 1024
rcvBuf: 4194304
sndBuf: 4194304
local: true # set to false if you want to run OpenGFW on FORWARD chain
rst: false # set to true if you want to send RST for blocked TCP connections, local=false only
local: true # (1)!
rst: false # (2)!

workers:
count: 4
queueSize: 16
tcpMaxBufferedPagesTotal: 4096
tcpMaxBufferedPagesPerConn: 64
count: 4 # (3)!
queueSize: 64
tcpMaxBufferedPagesTotal: 65536
tcpMaxBufferedPagesPerConn: 16
udpMaxStreams: 4096

# The path to load specific local geoip/geosite db files.
Expand All @@ -51,3 +51,7 @@ workers:
# geoip: geoip.dat
# geosite: geosite.dat
```

1. Set to false if you want to run OpenGFW on FORWARD chain (e.g. on a router)
2. Set to true if you want to send RST for blocked TCP connections, **local=false only**
3. Recommended to be no more than the number of CPU cores
16 changes: 10 additions & 6 deletions docs/docs/build-run.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ io:
queueSize: 1024
rcvBuf: 4194304
sndBuf: 4194304
local: true # 如果需要在 FORWARD 链上运行 OpenGFW,请设置为 false
rst: false # 是否对要阻断的 TCP 连接发送 RST。仅在 local=false 时有效
local: true # (1)!
rst: false # (2)!

workers:
count: 4
queueSize: 16
tcpMaxBufferedPagesTotal: 4096
tcpMaxBufferedPagesPerConn: 64
count: 4 # (3)!
queueSize: 64
tcpMaxBufferedPagesTotal: 65536
tcpMaxBufferedPagesPerConn: 16
udpMaxStreams: 4096

# 指定的 geoip/geosite 档案路径
Expand All @@ -51,3 +51,7 @@ workers:
# geoip: geoip.dat
# geosite: geosite.dat
```

1. 如果想在 FORWARD 链上运行(如在路由器上),设置为 false
2. 如果想为被阻断的 TCP 连接发送 RST,设置为 true。**仅在 local=false 时有效**
3. 建议不超过 CPU 核心数

0 comments on commit 709e8eb

Please sign in to comment.