proxy config

`
mkdir -p ~/.config/clash

外部控制面板(可选)

external-controller: 0.0.0.0:9090
secret: ""

允许局域网访问(可选)

allow-lan: true

日志

log-level: info

手动定义服务器 A 的 HTTP 代理(用于国内)

proxies:

  • name: "国内代理-A"
    type: http
    server: 10.10.10.1 # 服务器 A 的内网 IP
    port: 8080

    如果 A 有认证,取消注释:

    username: "your-username"

    password: "your-password"

  • name: "Socks5-国内代理A"
    type: socks5
    server: 10.10.10.1 # 服务器 A 的内网 IP
    port: 1080

从订阅中加载“梯子”节点

proxy-providers:
provider1:
type: http
url: "https://example.com/clash.yaml?token=xxxxx" # ← 替换为你的订阅链接
interval: 3600 # 每小时更新一次节点
health-check:
enable: true
url: https://www.google.com
interval: 300
proxy:
- name: "订阅节点" # 可选:重命名节点

dns:
enable: true
listen: 0.0.0.0:53
enhanced-mode: redir-host
nameserver:
- 223.5.5.5
- 119.29.29.29
fallback:
- 8.8.8.8
- 1.1.1.1
fallback-filter:
geoip: true
geoip-override: false
ipcidr:
- 240.0.0.0/4

#!/bin/bash
# start-clash.sh

# 启动 Clash
nohup clash -d ~/.config/clash > clash.log 2>&1 &

echo "Clash started on :7890"
echo "Use: export http_proxy=http://127.0.0.1:7890"

`

posted @ 2025-08-29 23:59  todaygood  阅读(1)  评论(0)    收藏  举报