Lazy Clash is a one-click deployment solution for Clash based on Docker Compose. It can help you quickly set up a Clash proxy service with automatically updated subscriptions. —— by ChatGPT
Personal usage scenarios:
git clone https://cnb.cool/kangaroohy/open-source/clash-with-ui.git
.env file or mount your config file to /root/.config/clash/config.yamlcd clash-with-ui
cp .env.example .env
# Set RAW_SUB_URL="your clash subscription url" in .env
# (Optional) Set API_SECRET="your api secret" in .env
or
... volumes: - /path/to/your/config.yaml:/root/.config/clash/config.yaml ...
just need keep
subconverterdirectory and.envconfig file anddocker-compose.yaml
docker compose up -d
If only local access proxy is needed, simply modify the YAML to make it accessible from 127.0.0.1
services:
subconverter:
image: docker.cnb.cool/kangaroohy/open-source/clash-with-ui/subconverter:latest
deploy:
resources:
limits:
memory: 128MB
hostname: subconverter
container_name: subconverter
volumes:
- ./subconverter/all_base.tpl:/base/base/all_base.tpl
- ./subconverter/pref.toml:/base/pref.toml
ports:
- "127.0.0.1:25500:25500"
clash-with-ui:
image: docker.cnb.cool/kangaroohy/open-source/clash-with-ui:latest
deploy:
resources:
limits:
memory: 256MB
container_name: clash-with-ui
depends_on:
- subconverter
env_file:
- .env
ports:
- "127.0.0.1:$ALL_PROXY_PORT:7890"
- "127.0.0.1:$CONTROL_PANEL_PORT:9090"
View control panel: http://[server-ip]:9090/ui?hostname=[server-ip]
export https_proxy=http://[server-ip]:7890
export http_proxy=http://[server-ip]:7890
export all_proxy=socks5://[server-ip]:7890
Why emmbedded web control panel?
In many usage scenarios, there are no conditions to use a public control panel (such as yacd.haishan.me) to manage Clash.If conditions permit, you can still use your own management tool.
What should I do if I fail to build the project because I can't access Dockerhub / Github on the server?
This project in itself exists for engineering purposes, and as a project contributor, I cannot provide dependencies that can be used in various complex internal and external network environments. I suggest that you fork this project and modify the Dockerfile and docker-compose yourself, pointing the dependencies to an accessible image source.