单节点部署:
bashsudo apt install -y curl unzipcurl -L https://github.com/Dreamacro/clash/releases/download/premium/clash-linux-amd64-v1.16.0.gz | gunzip > /usr/local/bin/clashchmod +x /usr/local/bin/clash
config.yaml
):yamlport: 7890 socks-port: 7891 mixed-port: 7892 proxies: - name: "Node-1" type: vless server: example.com port: 443 uuid: "your-uuid"
bashclash -d /etc/clash
集群化扩展:
nginxupstream clash_cluster {server 192.168.1.1:7890 weight=5;server 192.168.1.2:7890 weight=3;}server {listen 80;location / {proxy_pass http://clash_cluster;}}
metrics
:yamlmetrics: "0.0.0.0:9090"
yamlscrape_configs: - job_name: "clash" static_configs: - targets: ["192.168.1.1:9090"]
用户价值: