Clash on Linux Tutorial

Introduction

Clash is an open-source network tunneling application designed to manage and forward internet traffic. It supports various protocols like SOCKS5, HTTP, and HTTPS and is widely used for proxying and routing network requests to bypass internet censorship or for privacy enhancement.

Simplelink builds on Clash’s capabilities, offering a premium VPN service tailored for exceptional quality and speed, particularly in regions with stringent internet controls, such as China. Simplelink simplifies connecting to the internet securely and privately, boasting fast connection speeds and reliability.

Getting Started with Clash and Simplelink

Downloading the Correct Binary

Typical Linux ArchitectureFile Download Name
x64-based Desktops (amd64)clash.meta-linux-amd64-alpha-2441955.gz
Raspberry Pi 1/Zero (armv6)clash.meta-linux-armv6-alpha-2441955.gz
Raspberry Pi 2 (armv7)clash.meta-linux-armv7-alpha-2441955.gz
Raspberry Pi 3 (32-bit mode)clash.meta-linux-arm-7-cgo-alpha-2441955.gz
Raspberry Pi 3/4 (64-bit mode)clash.meta-linux-arm64-alpha-2441955.gz
Odroid XU4 (armv7)clash.meta-linux-armv7-alpha-2441955.gz
Odroid C2/N2/N2+ (arm64)clash.meta-linux-arm64-alpha-2441955.gz

Unzip the downloaded Clash binary if necessary and make it executable:

$ gunzip clash.meta-linux-amd64-alpha-2441955.gz
$ chmod +x clash.meta-linux-amd64-alpha-2441955

Obtaining the Configuration File

  • Go to https://wbsite.simpleapp.top and scroll to the bottom of the page to find the “Clash Subscribe” button.
  • Click on “Copy Clash URL” to copy the subscription URL to your clipboard.
  • Use the following command to download the configuration file as simplelink.yaml
$ wget -O simplelink.yaml 'PASTE_THE_COPIED_URL_HERE'

Running Clash

  • Navigate to the directory where you downloaded the Clash binary.
  • Make the binary executable with chmod +x CLASHBINNAME.
  • Start Clash by running
$ ./clash.meta-linux-amd64-alpha-2441955 -f simplelink.yaml

Setting Up System Proxy

To route all traffic through Clash, you need to configure your system’s proxy settings. Clash typically listens on three ports:

  • HTTP proxy: 127.0.0.1:7890
  • SOCKS proxy: 127.0.0.1:7891
  • Redirect proxy: 127.0.0.1:7892

For GNOME (Ubuntu, Fedora, etc.):

  1. Open “Settings” > “Network” > “Network Proxy”.
  2. Set the “Manual” method.
  3. Enter 127.0.0.1 for both the HTTP and HTTPS proxies and 7890 as the port.
  4. Apply the changes.

For KDE Plasma:

  1. Go to “System Settings” > “Network Settings” > “Proxy”.
  2. Choose “Manually specify proxy settings”.
  3. Set both the HTTP and HTTPS proxies to 127.0.0.1 with port 7890.
  4. Apply and save.

Command Line (bashrc):

For terminal applications, you can set proxy variables in your .bashrc:

$ export http_proxy="http://127.0.0.1:7890/"
$ export https_proxy="https://127.0.0.1:7890/"

Reload the configuration with source ~/.bashrc or restart your terminal.