clash-core

command module
v0.0.0-...-7c62277 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

README

Clash
Clash

A rule-based tunnel in Go.

Github Actions

Features

This is a general overview of the features that comes with Clash.

  • Inbound: HTTP, HTTPS, SOCKS5 server, TUN device
  • Outbound: Shadowsocks(R), VMess, Trojan, Snell, SOCKS5, HTTP(S), Wireguard
  • Rule-based Routing: dynamic scripting, domain, IP addresses, process name and more
  • Fake-IP DNS: minimises impact on DNS pollution and improves network performance
  • Transparent Proxy: Redirect TCP and TProxy TCP/UDP with automatic route table/rule management
  • Proxy Groups: automatic fallback, load balancing or latency testing
  • Remote Providers: load remote proxy lists dynamically
  • RESTful API: update configuration in-place via a comprehensive API

Some of the features may only be available in the Premium core.

Compile

Requirements

  • Go >= 1.20
  • make

Compile

  • Open Makefile;

  • Goto line 40, change or add the target platform;

  • Open command line

     cd {PATH}/clash-core
     make
    
  • Packages are in folder {PATH}/clash-core/bin/

Using

  • The configuration file would be created after clash first started.

  • Configuration file loaction:

    • Windows: C:\Users\{username}\.config\clash\config.yaml

    • Linux: ~/.config/clash/config.yaml

Ubuntu

使用说明
  • config.yaml 文件内容可通过 Clash for Windows 等客户端获取,步骤:

    • 点击 “Profiles”
    • 选中配置文件,右键,选择 “Edit” 或 “Edit externally”
    • 全选复制文件内容
    • 粘贴到 config.yaml
  • clash 运行起来后,可能还是无法使用,需要设置代理:

  • 设置代理方式:

    • 新建文件 proxy_set:

      # !/bin/bash
      
      # 开启终端代理
      cat > /etc/profile.d/proxy.sh << EOF
      #!/bin/bash
      export http_proxy=http://127.0.0.1:7890
      export https_proxy=http://127.0.0.1:7890
      EOF
      
      source /etc/profile.d/proxy.sh
      
    • 新建文件 proxy_unset:

      # !/bin/bash
      
      rm -rf /etc/profile.d/proxy.sh
      unset http_proxy
      unset https_proxy
      
    • 使用方法:

      • 开启代理:. ./proxy_set
      • 关闭代理:. ./proxy_unset

Documentation

Credits

License

This software is released under the GPL-3.0 license.

FOSSA Status

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL