Repository navigation
Conversation
sparkfade
force-pushed
the
fix/nftables-cleanup-unstarted
branch
from
September 29, 2026 06:48
6ee0bca to
4080cfa
Compare
sparkfade
force-pushed
the
fix/nftables-cleanup-unstarted
branch
2 times, most recently
from
October 2, 2026 09:01
6e6160d to
17fc1f1
Compare
Author
|
@nekohasekai plz take a look at this thank u |
sparkfade
force-pushed
the
fix/nftables-cleanup-unstarted
branch
from
October 8, 2026 08:41
17fc1f1 to
944419e
Compare
sparkfade
force-pushed
the
fix/nftables-cleanup-unstarted
branch
from
October 9, 2026 16:08
944419e to
0e74bbd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
autoRedirect.Close()unconditionally deleted theinet sing-boxnftables table, even for instances that never enteredStart()and therefore never created it. Closing such an instance silently removes the table that is still managed by the running instance.sing-box tools fetch(and the othertoolssubcommands) builds the box withbox.New()+PreStart()and closes it on exit, so running a diagnostic tool against a config withauto_redirectbreaks transparent proxying for the whole LAN until the service is restarted. (Observed on Linux with sing-box 1.14.2: the table disappears immediately after the command exits.)Start(), so failed setups are still cleaned up, andClose()only cleans up when it was marked. This mirrors the iptables backend, where cleanup only runs when the paths were configured duringStart().Test plan
tun+auto_redirectcreates the table; a second instance that only runsPreStart/Closeno longer deletes itStart()failure after taking over the table still cleans up the partial table