clash_proxy - Environment Variables¶
A shell script for setting up proxy environment variables in the current session.
Usage:
eval "$(clash_proxy)"
- Description:
This script reads the configuration from
config.yamland sets up all necessary proxy environment variables for the current shell session.- Environment Variables Set:
http_proxy/HTTP_PROXYhttps_proxy/HTTPS_PROXYall_proxy/ALL_PROXY(SOCKS5)no_proxy/NO_PROXY
- Features:
Automatic port detection from config file
Error handling and validation
Both lowercase and uppercase variable formats
Support for HTTP and SOCKS5 proxies
Permission Requirements¶
No special permissions required. Can be run by any user.
Troubleshooting¶
Issue: clash_proxy Variables Not Set
If environment variables aren’t being set:
Make sure to use
eval "$(clash_proxy)"orsource clash_proxy(not just./clash_proxy)Check that
config.yamlexists and contains valid port numbersVerify the script has read permissions