7

【笔记】通过 Docker 部署 Clash

 1 year ago
source link: https://loli.fj.cn/2023/06/23/%E9%80%9A%E8%BF%87Docker%E9%83%A8%E7%BD%B2Clash/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

通过 Docker 部署 Clash,实现网络代理
本篇只介绍 Clash 核心的部署方法,如需使用操作可以尝试通过 Docker 部署 Yacd
Clash 也可以作为 DNS 服务器防止 DNS 污染

准备一个 Clash 配置文件

  • 创建一个 config.yaml 配置文件

config.yaml

port: 7890
socks-port: 7891
redir-port: 7892
mixed-port: 7893
allow-lan: true
mode: global
log-level: info
external-controller: :9090
dns:
enable: true
ipv6: true
listen: 0.0.0.0:53
nameserver:
- 8.8.8.8
proxies:
- {name: 节点名称, server: 节点服务器域名或IP地址, port: 节点端口号, type: 节点代理类型, cipher: 节点密码加密方式, password: 节点密码, udp: true}

通过 Docker 部署

docker run -d --network=doc_docker --ip=192.168.201.10 --name clash --restart=always -v /etc/disk/2df6cf6c-ae08-400c-a1a6-7effc886536e/Clash/config:/root/.config/clash/ dreamacro/clash

Youtube——Sagit
DockerHub——dreamacro/clash


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK