MetaCubeX / mihomo

A simple Python Pydantic model for Honkai: Star Rail parsed data from the Mihomo API.
https://wiki.metacubex.one
MIT License
13.86k stars 2.4k forks source link

Tun + autoroute不能正确连接本地的socks代理 #263

Open lchannng opened 1 year ago

lchannng commented 1 year ago

Alpha:2a8e1778ad1d7b507e432f659407d76dffcaacb8 编译的 运行环境:opwnwrt 22.03.2

interface: wan: x.x.x.x br-lan: 172.17.2.1 Meta: 198.18.0.1 # tun

openwrt上开了一个socks5代理, listen br-lan: 172.17.2.1:9999

https://github.com/MetaCubeX/Clash.Meta/blob/Meta/component/dialer/dialer.go#L111 开tun + autoroute + auto-detect-interface,dialer绑定在wan上,这个时候不能连接br-lan的代理

报错

connect error: dual stack tcp shake hands failed

lchannng commented 1 year ago

traceroute了一下,是走wan的gateway出去了,跑远了,永远都连不上br-lan的...

leeaash commented 7 months ago

找打一个很土鳖的办法,写一个本地接口的proxy, 然后利用rule强制流量走此proxy,不知道有没有更好的实现办法

  -
    name: HOME
    type: select
    interface-name: br-lan
    proxies:
      - DIRECT