A rule based proxy For Mac base on Clash.

Related tags

Network clashX
Overview

Clash
ClashX

A rule based proxy For Mac base on Clash.

ClashX 旨在提供一个简单轻量化的代理客户端,如果需要更多的定制化,可以考虑使用 CFW Mac 版

Features

  • HTTP/HTTPS and SOCKS protocol
  • Surge like configuration
  • GeoIP rule support
  • Support Vmess/Shadowsocks/Socks5/Trojan
  • Support for Netfilter TCP redirect

Install

You can download from Release page

Download ClashX Pro With enhanced mode and Native Apple Silicon support at AppCenter for free permanently.

Build

  • Make sure have python3 and golang installed in your computer.

  • Install Golang

    brew install golang
    
    or download from https://golang.org
    
  • Download deps

    bash install_dependency.sh
    
  • Build and run.

Config

The default configuration directory is $HOME/.config/clash

The default name of the configuration file is config.yaml. You can use your custom config name and switch config in menu Config section.

Checkout Clash or SS-Rule-Snippet for Clash or lancellc's gitbook for more detail.

Advance Config

Change the ports of ClashX

Please modify the config.yaml file generated by ClashX, not the other config file you created or downloaded. The General section settings in your custom config file would be ignored. Then relaunch ClashX to apply changes.

Change your status menu icon

Place your icon file in the ~/.config/clash/menuImage.png then restart ClashX

Change default system ignore list.

  • Download sample plist in the Here and place in the

    ~/.config/clash/proxyIgnoreList.plist
    
  • Edit the proxyIgnoreList.plist to set up your own proxy ignore list

Use url scheme to import remote config.

  • Using url scheme describe below

    clash://install-config?url=http%3A%2F%2Fexample.com&name=example
    

Get process name

You can add the follow config in your config file, and set your proxy mode to rule. Then open the log via help menu in ClashX.

script:
  code: |
    def main(ctx, metadata):
      # Log ProcessName
      ctx.log('Process Name: ' + ctx.resolve_process_name(metadata))
      return 'DIRECT'

FAQ

  • Q: How to get shell command with external IP?
    A: Click the clashX menu icon and then press Option-Command-C
Comments
  • URL Scheme to reload current config

    URL Scheme to reload current config

    Motivation: I have a script that changes the app's configuration based on other config files. When that happens, the app detects the change and ask the user to update. But it requires the user to click on the notification.

    This change would allow to programatically tell ClashX to update the config without user intervention

    opened by MPTres 2
  • Add support for AppleScript

    Add support for AppleScript

    AppleScript support has been added to work with keyboard shortcuts.

    You can now write AppleScript like this:

    tell application "ClashX" to toggleProxy
    

    or

    tell application "ClashX" to proxyMode "global"
    

    After adding the above code to the system shortcuts, ClashX can quickly switch proxy options.

    opened by vince-hz 1
  • resolve compiling issue of LoginServiceKit

    resolve compiling issue of LoginServiceKit

    fix compiling issue:

    Workspaces/clashX/ClashX/Vendor/LoginServiceKit/LoginServiceKit.swift:64:75: value of optional type 'LSSharedFileListItem?' must be unwrapped to a value of type 'LSSharedFileListItem'

    opened by zfdang 1
  • docs: add instructions for change ports

    docs: add instructions for change ports

    I'm new to this awesome client but get confused when try to change the ports. My modifications to the config file was not instantly applied by clicking the Reload config menu item but until I relaunched ClashX.

    I believe this extra instruction could help reduce confusion for other new users. However, it would be better if the changes could be applied with the Reload config.

    opened by EnixCoda 1
  • Use AF validation to discard invalid http status codes

    Use AF validation to discard invalid http status codes

    Use AlamoFire validation to only accept valid http status codes (200<300) when downloading a configuration file.

    This solves one of the issues explained in #419

    opened by MPTres 1
  • List Trojan as a supported protocol

    List Trojan as a supported protocol

    Example macOS clashX config using Trojan

    port: 7890
    socks-port: 7891
    redir-port: 7892
    allow-lan: false
    mode: Rule
    log-level: silent
    external-controller: '0.0.0.0:9090'
    secret: ''
    proxies:
      - name: 'my trojan proxy'
        type: trojan
        server: eg.wonderful.me
        port: 443
        password: YOUR_PASSWORD
        alpn:
          - h2
          - http/1.1
    
    opened by knightelessar 1
  • Add license scan report and status

    Add license scan report and status

    Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README.

    Below are docs for integrating FOSSA license checks into your CI:

    opened by fossabot 1
  • Bump GH actions

    Bump GH actions

    https://github.com/actions/checkout/releases/tag/v3.0.0 https://github.com/actions/setup-go/releases/tag/v3.0.0 https://github.com/actions/setup-node/releases/tag/v3.0.0

    opened by Goooler 0
  • Update README.md

    Update README.md

    Today I meet clashX it has one more subscription function than SS-NG. I love it.

    I added a subscription and my own nodes, then, saved it, but when I update the subscription, my own nodes all gone.

    Is there a way to achive it that has both the subscription's nodes and my own nodes at the same time?

    @yichengchen

    opened by yangxyo 0
Releases(1.96.2)
Owner
Yicheng
Yicheng
Clash - A rule-based tunnel in Go.

Clash A rule-based tunnel in Go. Features Local HTTP/HTTPS/SOCKS server with authentication support VMess, Shadowsocks, Trojan, Snell protocol support

Dreamacro 35k Jan 5, 2023
An util to bypass clash-premium tun for commands

without-clash An util to bypass clash-premium tun for commands Requirement Kernel Features: cgroup2 ebpf && cgroup2 sock attach point iproute2 Install

Kr328 15 Dec 19, 2022
ClashWebLite is a cross-platform lightweighted wrapper for Clash Premium on Desktop environment.

ClashWebLite ClashWebLite is a cross-platform lightweighted wrapper for Clash Premium on Desktop environment. http://127.0.0.1:9090/ui: Features Suppo

null 46 Dec 29, 2022
A base gui tool for xray/v2ray/hysteria/trojan-go without system proxy

A base gui tool for xray/v2ray/hysteria/trojan-go without system proxy

youlika 16 Dec 8, 2022
A rule-based tunnel in Go with experimental features

Experimental-Clash A rule-based tunnel in Go with experimental features. Features Local HTTP/HTTPS/SOCKS server with authentication support VMess, Sha

Clash .NET 137 Dec 25, 2022
The 20-20-20 Rule can help protect your eyesight.

The 20 20 20 Rule This app reminds you every 20 minutes to look at something 20 feet away for 20 seconds. This helps protect your eyesight. Disclaimer

null 3 Mar 9, 2022
A tool helps connect to your AriPods when sound playing in your Mac

Auto connect to airpods this tool helps connect to your AriPods when sound playing in your Mac. dependencenes SwitchAudioSource $ brew install switcha

Fndroid 2 Dec 9, 2021
Connect directly to Docker-for-Mac containers via IP address 🐳 💻

Docker Mac Net Connect Connect directly to Docker-for-Mac containers via IP address. Features L3 connectivity: Connect to Docker containers from macOS

Chipmunk 151 Jan 5, 2023
MAC Address & Prefix Utility for Go

macaddr MAC Address & Prefix Utility for Go Installation go get -d github.com/thatmattlove/go-macaddr Usage Single MAC Address mac, err := macaddr.Pa

Matt Love 7 Feb 7, 2022
Diameter stack and Base Protocol (RFC 6733) for the Go programming language

Diameter Base Protocol Package go-diameter is an implementation of the Diameter Base Protocol RFC 6733 and a stack for the Go programming language. St

Alexandre Fiori 214 Dec 28, 2022
Open source 5G core network base on 3GPP R15

What is free5GC The free5GC is an open-source project for 5th generation (5G) mobile core networks. The ultimate goal of this project is to implement

free5GC 1.5k Jan 4, 2023
go stomp server base on net/http

stompserver go stomp server base on "net/http" base on "net/http" and "golang.org/x/net/websocket" so use one port, you can be WebServer or StompServe

0xAAFF 1 Sep 22, 2022
A base library defines interfaces and modules of aBFT Lachesis consensus protocol

Lachesis base A base library defines interfaces and modules of aBFT Lachesis consensus protocol. Part of galaxy' s Consensus-as-a-Service for distribu

Galaxy developer Team 10 Oct 25, 2021
Gogrok is a self hosted, easy to use alternative to ngrok. It uses SSH as a base protocol, using channels and existing functionality to tunnel requests to an endpoint.

gogrok A simple, easy to use ngrok alternative (self hosted!) The server and client can also be easily embedded into your applications, see the 'serve

Tyler Stuyfzand 6 Dec 3, 2022
Ebpfmanager - A golang ebpf libary base on cilium/ebpf and datadog/ebpf

介绍 ebpfmanager参照datadog/ebpf/manager包的思想,基于cilium/ebpf实现的ebpf类库封装。 相比cilium/ebpf

null 152 Dec 29, 2022
An experimental Tor-Proxy serivce written in Go using Go-proxy and Go-libtor.

tor-proxy An experimental standalone tor-proxy service built with Go, using go-proxy, go-libtor and bine. This is a simple replacement to Tor's origin

Narasimha Prasanna HN 35 Nov 9, 2022
mt-multiserver-proxy is a reverse proxy designed for linking multiple Minetest servers together

mt-multiserver-proxy mt-multiserver-proxy is a reverse proxy designed for linking multiple Minetest servers together. It is the successor to multiserv

null 16 Nov 17, 2022
A simple tool to convert socket5 proxy protocol to http proxy protocol

Socket5 to HTTP 这是一个超简单的 Socket5 代理转换成 HTTP 代理的小工具。 如何安装? Golang 用户 # Required Go 1.17+ go install github.com/mritd/[email protected] Docker 用户 docker pull m

mritd 10 Jan 2, 2023