1. Source Code Link to heading

Source Code

2. Usage Link to heading

  • Navigate to the project directory
$ cd clash-for-linux
  • Run the startup script
$ sudo bash start.sh

Checking subscription URL...
Clash subscription URL is accessible!                          [  OK  ]

Downloading Clash configuration file...
Configuration file config.yaml downloaded successfully!         [  OK  ]

Starting Clash service...
Service started successfully!                                   [  OK  ]

Clash Dashboard URL: http://<ip>:9090/ui
Secret: xxxxxxxxxxxxx
  • Load environment variables
source /etc/profile.d/clash.sh
  • Enable system proxy
proxy_on
  • To temporarily disable the system proxy
proxy_off
  • For details, refer to the “start” section in the readme. This Clash setup will configure the proxy in the terminal. When proxy_on is activated in the terminal, only that terminal uses the proxy, not the system-wide proxy.

3. Proxy Verification in Terminal Link to heading

Method 1. env | grep -E 'http_proxy|https_proxy|ALL_PROXY' # If the following is returned, the proxy is working

http_proxy=http://127.0.0.1:7890
https_proxy=http://127.0.0.1:7890

Method 2. wget -qO- ipinfo.io # If the returned IP is the proxy server's IP, rather than your local IP, it means wget is using the proxy.