From 9cf07a2b4726d98c0278f5aaf1567a4e383626d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Mon, 17 Jun 2024 22:38:34 +0800 Subject: [PATCH] auto-redirect: Cleanup before start --- redirect_linux.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/redirect_linux.go b/redirect_linux.go index cafdd61..e5c8f27 100644 --- a/redirect_linux.go +++ b/redirect_linux.go @@ -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 {