systemcall

有办法通过 DNS 分流实现国内网站直连、国外网站走 clash 的 fake-ip 吗?

  •  
  •   systemcall · Oct 9, 2022 via Android · 6036 views
    This topic created in 1320 days ago, the information mentioned may be changed or developed.

    试了一下 smartdns ,好像不行,每次返回的都不是 fake-ip

    9 replies    2022-11-01 15:36:06 +08:00
    yuange1975
        1
    yuange1975  
       Oct 9, 2022
    adguard home
    ltkun
        2
    ltkun  
       Oct 9, 2022 via Android
    mosdns
    ericww
        3
    ericww  
       Oct 9, 2022 via iPhone
    xubair
        4
    xubair  
       Oct 9, 2022
    mosdns
    pffrank
        6
    pffrank  
       Oct 10, 2022
    smartdns+adguard home
    tvirus
        7
    tvirus  
       Oct 11, 2022
    mosdns-cn
    neroxps
        8
    neroxps  
       Oct 12, 2022
    https://github.com/charleyzhu/coredns_wormhole_plugin

    作者很懒没写文档,coredns 插件支持 clash 规则。
    fish3125
        9
    fish3125  
       Nov 1, 2022
    用 fake-ip 模式,需要两个条件
    1.
    需要把 dns 解析转发给 clash 的 dns 端口,这一步你使用 smardns ,需要在改软件配置转发部分或全部域名解析。然后才会按照你在 clash 里的规则来返回正常或者 fakeip 。我是用 adg 只 gfw 列表的给 clash ,然后让 clash 的 dns 返回的全是 fakeip 。
    2.
    如果用开源的 clash ,没有 tun 模式,但是我们可以把这两条写入防火墙,必须把 fakeip 转发给 clash 的 redir-port ,内部会自动完成正确域名的转换。
    iptables -t nat -A OUTPUT -p tcp -d 198.18.0.0/16 -j REDIRECT --to-port 8088
    iptables -t nat -A PREROUTING -p tcp -d 198.18.0.0/16 -j REDIRECT --to-port 8088#把 ip 段重定向到 clash 的 redir-port
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5184 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 104ms · UTC 09:09 · PVG 17:09 · LAX 02:09 · JFK 05:09
    ♥ Do have faith in what you're doing.