Skip to content

Commit 3dcf11b

Browse files
committed
fix: clear persistent system proxy during uninstall
1 parent 8be724c commit 3dcf11b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

uninstall.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ source "$PROJECT_DIR/scripts/init/systemd.sh"
2929
source "$PROJECT_DIR/scripts/init/systemd-user.sh"
3030
source "$PROJECT_DIR/scripts/init/script.sh"
3131

32+
print_current_shell_proxy_cleanup_hint() {
33+
echo
34+
echo "如果当前终端仍然存在代理变量,请执行:"
35+
echo "unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY no_proxy NO_PROXY"
36+
}
37+
3238
init_project_context "$PROJECT_DIR"
3339
load_env_if_exists
3440
detect_install_scope auto
@@ -44,6 +50,7 @@ remove_shell_alias_entry || true
4450
if [ "$PURGE_RUNTIME" = "true" ]; then
4551
rm -rf "$RUNTIME_DIR"
4652
clear_controller_secret || true
53+
print_current_shell_proxy_cleanup_hint
4754
echo "🗑️ 已删除运行目录:$RUNTIME_DIR"
4855
echo "🧩 保留内容:项目目录仍在(已清理 controller secret)"
4956
elif [ "$DEV_RESET" = "true" ]; then
@@ -77,10 +84,12 @@ elif [ "$DEV_RESET" = "true" ]; then
7784

7885
rm -rf "$cache_backup_dir" 2>/dev/null || true
7986
clear_controller_secret || true
87+
print_current_shell_proxy_cleanup_hint
8088

8189
echo "🧪 已清理安装状态:$RUNTIME_DIR"
8290
echo "🧩 保留内容:subscriptions.yaml、下载缓存与项目目录仍在(已清理 controller secret)"
8391
else
92+
print_current_shell_proxy_cleanup_hint
8493
echo "📦 已卸载安装入口,保留运行目录:$RUNTIME_DIR"
8594
echo "🧩 保留内容:runtime 数据仍在"
8695
fi

0 commit comments

Comments
 (0)