V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
qazgp
V2EX  ›  OpenWrt

想知道 openclash 怎么设置自定义域名走指定的某个节点

  •  
  •   qazgp · 3 天前 · 775 次点击
    设置里面太复杂了 没看明白,网上搜好像没搜到
    7 条回复    2025-03-30 00:24:08 +08:00
    totoro625
        1
    totoro625  
       3 天前   ❤️ 2
    直接看 wiki
    rules:
    - DOMAIN,完整的自定义域名,某个节点
    - DOMAIN-SUFFIX,自定义域名后缀,某个节点
    qazgp
        2
    qazgp  
    OP
       3 天前
    @totoro625 好的 谢谢
    oneisall8955
        3
    oneisall8955  
       3 天前
    节点分组为 select ,新增域名规则指定这个分组
    hwdq0012
        4
    hwdq0012  
       3 天前
    打开规则文件随便看看就知道了

    ```yaml
    allow-lan: true
    bind-address: '*'
    dns: 略
    external-controller: 127.0.0.1:9090
    log-level: info
    mixed-port: 7890
    mode: rule
    proxies:
    - name: "\U0001F1ED\U0001F1F0 香港-广东专线 BGP 1"
    password: 81d9cc29-95e9-4f4f-aca3-ec27d23755c1
    port: "32443"
    server: lbso.bnnodeservice.com
    sni: cert.bitbyte.one
    type: trojan
    udp: true
    proxy-groups:
    - name: Bitz Net
    proxies:
    - 自动选择
    - 故障转移
    - "\U0001F1ED\U0001F1F0 香港-广东专线 BGP 1"
    - "\U0001F1ED\U0001F1F0 香港-广东专线 BGP 2"
    type: select
    - interval: 86400
    name: 自动选择
    proxies:
    - "\U0001F1ED\U0001F1F0 香港-广东专线 BGP 1"
    - "\U0001F1ED\U0001F1F0 香港-广东专线 BGP 2"
    type: url-test
    url: http://www.gstatic.com/generate_204
    - interval: 7200
    name: 故障转移
    proxies:
    - "\U0001F1ED\U0001F1F0 香港-广东专线 BGP 1"
    - "\U0001F1ED\U0001F1F0 香港-广东专线 BGP 2"
    type: fallback
    url: http://www.gstatic.com/generate_204
    rules:
    - DOMAIN,openai.com,Bitz Net
    - DOMAIN,intercom.io,Bitz Net
    - DOMAIN-KEYWORD,lianmeng,REJECT
    - DOMAIN-SUFFIX,mmstat.com,REJECT
    - PROCESS-NAME,Telegram,Bitz Net
    - IP-CIDR,91.108.4.0/22,Bitz Net,no-resolve

    ```

    删除了一些很长的东西,看下面 rules
    domain 是一个完整域名
    doman-keyword 是关键字
    domain-suffix 是域名后辍名
    process-name 是进程名
    ip-cidr 是根据 ip 段
    77158158
        5
    77158158  
       3 天前
    Nikki 其实更好用,更方便,而且改配置信息不需要重启,openclash 不行的
    https://github.com/nikkinikki-org/OpenWrt-nikki
    wolfie
        6
    wolfie  
       3 天前
    订阅模式,1L 写的那个规则,要写到 parsers 里
    Rinndy
        7
    Rinndy  
       3 天前 via iPhone
    @77158158 确实烦,改个配置就重启一遍。配置又多又乱。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5785 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 02:33 · PVG 10:33 · LAX 19:33 · JFK 22:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.