V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
tiansy
V2EX  ›  macOS

请教如何配置 clashx, 代理 192.168.0.0/16 的流量

  •  
  •   tiansy · Jun 10, 2022 · 2379 views
    This topic created in 1421 days ago, the information mentioned may be changed or developed.
    目前家里有公网 IP ,OpenWrt 上开了 SSR 服务端。在手机和 Mac 使用 Surge SSR 连接到 OpenWrt ,配合规则能够做到无感内网穿透,可是 ClashX 无论怎么配置,在 Rule 模式下 192.168.0.0/16 的连接都是走 DIRECT ,请问大家该如何配置,才能和 Surge 一样?

    如下是 ClashX 的规则设置

    port: 7890
    socks-port: 7891
    # redir-port: 7892

    allow-lan: false
    mode: Rule
    log-level: silent
    external-controller: 127.0.0.1:9090

    dns:
    enable: true
    ipv6: false
    nameserver:
    - 223.5.5.5
    - 223.6.6.6
    - 119.29.29.29
    - 114.114.114.114

    proxies:
    - {name: Home, server: xxx, port: xxx, type: ss, cipher: xxx, password: xxx, udp: true}

    proxy-groups:
    - name: Proxy
    type: select
    proxies:
    - Home
    Rule:
    - IP-CIDR,192.168.0.0/16,Proxy
    - MATCH,DIRECT

    也默认将 Proxy bypass 中的 192.168.0.0/16 删除了
    10.0.0.0/8, 172.16.0.0/12, 127.0.0.1, localhost, *.local, timestamp.apple.com
    4 replies    2022-06-10 17:09:26 +08:00
    likaci
        1
    likaci  
       Jun 10, 2022
    vi ~/.config/clash/proxyIgnoreList.plist

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <array>
    <string>127.0.0.1</string>
    <string>localhost</string>
    </array>
    </plist>
    tiansy
        2
    tiansy  
    OP
       Jun 10, 2022
    @likaci 这个方式试过了,bypass 192.168.0.0/16 后,在设置-网络 里的 proxies bypass 设置是生效了,但是还没没有作用。
    likaci
        3
    likaci  
       Jun 10, 2022
    clash log 里能看见请求吗? 我里是可以的, windows 的 CFW 也试过可以正常用
    或者你可以试试增强模式, 或者把 ip 绑上域名

    tiansy
        4
    tiansy  
    OP
       Jun 10, 2022 via iPhone
    多谢多谢,我换了个 profile ,改了规则,可以使用了,然后对比了下配置文件,发现是配置文件中 Rule: 这句出了问题,新的 clash 语法换成 rules: 了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   801 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 20:34 · PVG 04:34 · LAX 13:34 · JFK 16:34
    ♥ Do have faith in what you're doing.