Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: netlink queueNum/table config options #147

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

kpetku
Copy link
Contributor

@kpetku kpetku commented Sep 5, 2024

OpenGFW currently hard codes the netlink table name and queue number which causes conflict errors such as could not bind to requested queue 100: netlink receive: operation not permitted when running multiple instances of the application on the same host using different rulesets.

This pull request exposes configuration options that allow the user to set a unique table name and queueNum if they want to run multiple instances, for example:

io:
  queueSize: 1024
  table: 'opengfw2' # use a unique table if you want to run multiple instances
  queueNum: 102 # use a unique queue if you want to run multiple instances
  local: true # set to false if you want to run OpenGFW on FORWARD chain

Setting a unique table name will help prevent one instance from removing another already running application's rules when it exits.

@tobyxdd tobyxdd requested review from tobyxdd and haruue October 25, 2024 22:40
@haruue haruue self-assigned this Oct 27, 2024
io/nfqueue.go Outdated Show resolved Hide resolved
io/nfqueue.go Outdated Show resolved Hide resolved
@haruue haruue assigned tobyxdd and unassigned haruue Oct 28, 2024
@tobyxdd tobyxdd merged commit 278d731 into apernet:master Oct 28, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants