mirror of
https://github.com/SagerNet/sing-tun.git
synced 2025-04-04 04:17:39 +03:00
auto-redirect: Cleanup before start
This commit is contained in:
parent
086271ef29
commit
9cf07a2b47
1 changed files with 2 additions and 0 deletions
|
@ -134,8 +134,10 @@ func (r *autoRedirect) Start() error {
|
||||||
startAt := time.Now()
|
startAt := time.Now()
|
||||||
var err error
|
var err error
|
||||||
if r.useNFTables {
|
if r.useNFTables {
|
||||||
|
r.cleanupNFTables()
|
||||||
err = r.setupNFTables()
|
err = r.setupNFTables()
|
||||||
} else {
|
} else {
|
||||||
|
r.cleanupIPTables()
|
||||||
err = r.setupIPTables()
|
err = r.setupIPTables()
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue