From 7d4230ecfbc9bfb91e1b1a0db455fe63af654dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=98=AD?= <81747598+lan-yonghui@users.noreply.github.com> Date: Wed, 13 Nov 2024 14:50:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=B3=E9=97=AD=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=9B=B4=E6=96=B0=20Docker=20=E4=BB=A3?= =?UTF-8?q?=E7=90=86=20(#7028)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/docker.go | 2 +- frontend/src/views/setting/panel/proxy/index.vue | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/app/service/docker.go b/backend/app/service/docker.go index b662bce81..29257da9d 100644 --- a/backend/app/service/docker.go +++ b/backend/app/service/docker.go @@ -206,7 +206,7 @@ func (u *DockerService) UpdateConf(req dto.SettingUpdate) error { } daemonMap["proxies"] = proxies } - case "socks5-proxy": + case "socks5-proxy", "close-proxy": delete(daemonMap, "proxies") if len(req.Value) > 0 { proxies := map[string]interface{}{ diff --git a/frontend/src/views/setting/panel/proxy/index.vue b/frontend/src/views/setting/panel/proxy/index.vue index 27c4606c9..413ee91be 100644 --- a/frontend/src/views/setting/panel/proxy/index.vue +++ b/frontend/src/views/setting/panel/proxy/index.vue @@ -195,6 +195,9 @@ const submitChangePassword = async (formEl: FormInstance | undefined) => { loading.value = false; emit('search'); passwordVisible.value = false; + if (isClose) { + await updateDaemonJson(`${form.proxyType}-proxy`, ''); + } MsgSuccess(i18n.global.t('commons.msg.operationSuccess')); }) .catch(() => {