Sign inSign up

chenxinaz/clash_gw

By chenxinaz

•Updated over 5 years ago

Gateway service on single-NIC linux with Dreamacro/clash.

Image
0

1.1K

chenxinaz/clash_gw repository overview

Clash⁠ support VMess, Shadowsocks, Trojan, Snell protocol for remote connections, can run on linux, windows, mac on various hardware architectures, is popular and under active developing recently.

⁠Quick Reference

⁠Other Reference

⁠How to use this image

⁠Config docker log

It's recommended to limit docker daemon's log size, or you will soon runout of disk space. Modify your /etc/docker/daemon.json like the following:

{
    "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn/"],
        "log-driver": "json-file",
          "log-opts": {"max-size":"100m", "max-file":"3"}
}

⁠Create macvlan network for docker:

This image needs macvlan to function properly, modify the below sample to fit your needs.

docker network create -d macvlan --subnet=192.168.12.0/24 --gateway=192.168.12.1 --ip-range=192.168.12.64/30 -o parent=eth0 macnet

⁠Setup windows 10 client to use the gateway(optional)

  1. Create new external switch with hyper-v manager if there is no existing one.
  2. Create new vEthernet adapater with powershell(admin):
Add-VMNetworkAdapter -VMName vEthernetStatic2 -SwitchName External
  1. Set the new adapater's ip=192.168.12.12, gateway=192.168.12.64(ip of clash container).
  2. In browser(firefox), set proxy to socks5://192.168.12.64:7891(as macvlan config)

Now you can break through the great f*** wall.

Tag summary

Content type

Image

Digest

Size

72 MB

Last updated

over 5 years ago

docker pull chenxinaz/clash_gw