mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2026-10-10 12:13:04 +08:00
5f30fcdfef
#265 / #272: systemd_user_available() now requires XDG_RUNTIME_DIR and a live D-Bus socket before probing systemctl --user, preventing false-positives in containers (K8s/containerd) where systemctl exists but D-Bus is absent. #274: Remove 'export' from CLASH_FOR_LINUX_SHELL_LOADED guard in profile.sh generation so the variable stays local to the sourcing shell and does not leak into child shells (VSCode terminal, tmux pane, bash subshell), which was causing alias.sh to be skipped and http_proxy not exported in children. #270: Ensure compinit is loaded before bashcompinit in the generated zsh completion script so that compdef is available when bashcompinit registers completions, fixing 'command not found: compdef' on zsh setups that do not call compinit themselves. #271: Extend container_env_type() to detect cgroups v2 + containerd/K8s environments where /proc/1/cgroup only contains '0::/' and neither /.dockerenv nor legacy cgroup keywords are present. Detection now also inspects PID 1 comm and overlay root filesystem as fallbacks. #266: resolve_runtime_ports() accepts an optional config-file hint; when MIXED_PORT is not explicitly set in the environment, the port is read from the config file being normalized. normalize_runtime_config() passes its target file, so a user's 'mixed-port: 7899' in their subscription YAML is preserved instead of being silently overwritten with the default 7890.