auto-redirect: Cleanup before start

This commit is contained in:
世界 2024-06-17 22:38:34 +08:00
parent 086271ef29
commit 9cf07a2b47
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -134,8 +134,10 @@ func (r *autoRedirect) Start() error {
startAt := time.Now()
var err error
if r.useNFTables {
r.cleanupNFTables()
err = r.setupNFTables()
} else {
r.cleanupIPTables()
err = r.setupIPTables()
}
if err != nil {