From 942c87db2b4e51cbcf5f143cfafea8b883e1bef0 Mon Sep 17 00:00:00 2001 From: mzz2017 Date: Sun, 16 Feb 2020 15:47:38 +0800 Subject: [PATCH] fix: redirect method of transparent proxy --- gui/src/App.vue | 24 +---------------------- gui/src/components/modalSetting.vue | 15 +++------------ service/controller/version.go | 30 ++++++++++++++--------------- service/model/iptables/iptables.go | 2 +- 4 files changed, 20 insertions(+), 51 deletions(-) diff --git a/gui/src/App.vue b/gui/src/App.vue index 6959e40b..848e00fb 100644 --- a/gui/src/App.vue +++ b/gui/src/App.vue @@ -153,30 +153,8 @@ duration: 5000 }); } else { - localStorage["transparentValid"] = res.data.data.transparentValid; + localStorage["iptablesMode"] = res.data.data.iptablesMode; localStorage["dohValid"] = res.data.data.dohValid; - if ( - typeof res.data.data.transparentValid == "boolean" && //兼容旧版本 - res.data.data.transparentValid === false - ) { - this.$buefy.toast.open({ - message: "检测到v2ray-core版本低于4.19.1,不支持全局透明代理", - type: "is-warning", - position: "is-top", - duration: 3000 - }); - } - if ( - typeof res.data.data.transparentValid === "string" && //新版本 - res.data.data.transparentValid !== "yes" - ) { - this.$buefy.toast.open({ - message: "不支持全局透明代理: " + res.data.data.transparentValid, - type: "is-warning", - position: "is-top", - duration: 3000 - }); - } } } }); diff --git a/gui/src/components/modalSetting.vue b/gui/src/components/modalSetting.vue index ef719ce0..8a5a0dbb 100644 --- a/gui/src/components/modalSetting.vue +++ b/gui/src/components/modalSetting.vue @@ -39,11 +39,7 @@ - +