Skip to content

Commit 7d4230e

Browse files
authored
fix: 关闭代理同时更新 Docker 代理 (#7028)
1 parent d065837 commit 7d4230e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

backend/app/service/docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ func (u *DockerService) UpdateConf(req dto.SettingUpdate) error {
206206
}
207207
daemonMap["proxies"] = proxies
208208
}
209-
case "socks5-proxy":
209+
case "socks5-proxy", "close-proxy":
210210
delete(daemonMap, "proxies")
211211
if len(req.Value) > 0 {
212212
proxies := map[string]interface{}{

frontend/src/views/setting/panel/proxy/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ const submitChangePassword = async (formEl: FormInstance | undefined) => {
195195
loading.value = false;
196196
emit('search');
197197
passwordVisible.value = false;
198+
if (isClose) {
199+
await updateDaemonJson(`${form.proxyType}-proxy`, '');
200+
}
198201
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
199202
})
200203
.catch(() => {

0 commit comments

Comments
 (0)