Skip to content

怎么给当前shell设置代理的环境变量? #291

Description

@yunsmall

如题,我想实现开机时自动启动代理,但是我ssh上去后不会默认启用代理,而是需要手动启用代理环境变量,也可以手动取消设置代理环境变量。

我发现sudo bash install.sh system安装后的clashctlclashproxy等命令是安装到/usr/local/bin里面的。因此如果执行clashproxy on并不会设置当前shell的环境变量,只会设置启动的子进程的环境变量。

似乎要设置这些环境变量只能手动执行export http_proxy='http://127.0.0.1:7890'这种命令,有什么解决办法?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions