[Bug] Mihomo内核无法使用虚拟局域网内的主机上的代理服务器
Closed this issue · 5 comments
Verify steps
- I have read the documentation and understand the meaning of all configuration items I have written, avoiding a large number of seemingly useful options or default values.
- I have not reviewed the documentation and resolve this issue.
- I have not searched the Issue Tracker for the problem I am going to raise.
- I have tested with the latest Alpha branch version, and the issue still persists.
- I have provided server and client configuration files and processes that can reproduce the issue locally, rather than a desensitized complex client configuration file.
- I have provided the simplest configuration that can reproduce the error I reported, rather than relying on remote servers, TUN, graphical client interfaces, or other closed-source software.
- I have provided complete configuration files and logs, rather than providing only parts that I believe are useful due to confidence in my own intelligence.
Operating System
Windows
System Version
10.0.22631.3447
Mihomo Version
Mihomo Meta v1.18.6 windows amd64 with go1.22.4 Mon Jul 1 15:03:47 UTC 2024
Use tags: with_gvisor
Configuration File
mode: rule
mixed-port: 7890
allow-lan: true
log-level: debug
ipv6: true
external-controller: 127.0.0.1:9097
secret: <sensitive>
dns:
use-system-hosts: false
enable: true
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
nameserver:
- 114.114.114.114
- 223.5.5.5
- 8.8.8.8
fallback: []
fake-ip-filter:
- dns.msftncsi.com
- www.msftncsi.com
- www.msftconnecttest.com
profile:
store-selected: true
tun:
stack: gvisor
device: Mihomo
auto-route: true
auto-detect-interface: true
dns-hijack:
- any:53
strict-route: false
mtu: 1500
enable: true
proxies:
- name: 家里云Pi4B - ZT主网
type: socks5
server: <sensitive>
port: 1090
username: <sensitive>
password: <sensitive>
- name: 家里云Pi4B - ZT备网
type: socks5
server: <sensitive>
port: 1090
username: <sensitive>
password: <sensitive>
- name: 家里云Pi4B - TSNet
type: socks5
server: <sensitive>
port: 1090
username: <sensitive>
password: <sensitive>
- name: 家里云Pi4B - v6直连
type: socks5
server: <sensitive>
port: 1090
username: <sensitive>
password: <sensitive>
- name: 家里云Pi4B - OF港6
type: socks5
server: <sensitive>
port: 10090
username: <sensitive>
password: <sensitive>
- name: 炭云HKBGP 1Gbps/1T
type: vmess
server: <sensitive>
port: 443
uuid: <sensitive>
alterId: 0
cipher: auto
tls: true
skip-cert-verify: false
network: ws
ws-opts:
headers:
Host: <sensitive>
path: <sensitive>
proxy-groups:
- name: 公网
type: select
proxies:
- DIRECT
- REJECT
- ACL绕过
- ACL绕过 备用
- 翻墙
- name: 广告
type: select
proxies:
- DIRECT
- REJECT
- ACL绕过
- ACL绕过 备用
- 翻墙
- name: 本地
type: select
proxies:
- DIRECT
- REJECT
- ACL绕过
- ACL绕过 备用
- 翻墙
- name: 国内
type: select
proxies:
- DIRECT
- REJECT
- ACL绕过
- ACL绕过 备用
- 翻墙
- name: ACL绕过
type: url-test
proxies:
- 家里云Pi4B - ZT主网
- 家里云Pi4B - ZT备网
- 家里云Pi4B - TSNet
- 家里云Pi4B - v6直连
- 家里云Pi4B - OF港6
url: http://connectivitycheck.platform.hicloud.com/generate_204
interval: 300
- name: ACL绕过 备用
type: fallback
proxies:
- 家里云Pi4B - ZT主网
- 家里云Pi4B - ZT备网
- 家里云Pi4B - TSNet
- 家里云Pi4B - v6直连
- 家里云Pi4B - OF港6
- DIRECT
url: http://connectivitycheck.platform.hicloud.com/generate_204
interval: 300
- name: 翻墙
type: url-test
proxies:
- 炭云HKBGP 1Gbps/1T
url: http://connectivitycheck.gstatic.com/generate_204
interval: 300
- name: 翻墙 备用
type: fallback
proxies:
- 炭云HKBGP 1Gbps/1T
- DIRECT
url: http://connectivitycheck.gstatic.com/generate_204
interval: 300
rule-providers:
秋风广告规则:
type: http
behavior: domain
format: yaml
path: ./rule_providers/AWAvenue-Ads-Rule-Clash.yaml
url: https://mirror.ghproxy.com/https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main/Filters/AWAvenue-Ads-Rule-Clash.yaml
interval: 60480
BanAD:
type: http
behavior: classical
url: https://raw.staticdn.net/ACL4SSR/ACL4SSR/master/Clash/Providers/BanAD.yaml
path: ./ACL4SSR/BanAD.yaml
interval: 86400
BanEasyList:
type: http
behavior: classical
url: https://raw.staticdn.net/ACL4SSR/ACL4SSR/master/Clash/Providers/BanEasyList.yaml
path: ./ACL4SSR/BanEasyList.yaml
interval: 86400
BanEasyListChina:
type: http
behavior: classical
url: https://raw.staticdn.net/ACL4SSR/ACL4SSR/master/Clash/Providers/BanEasyListChina.yaml
path: ./ACL4SSR/BanEasyListChina.yaml
interval: 86400
BanEasyPrivacy:
type: http
behavior: classical
url: https://raw.staticdn.net/ACL4SSR/ACL4SSR/master/Clash/Providers/BanEasyPrivacy.yaml
path: ./ACL4SSR/BanEasyPrivacy.yaml
interval: 86400
BanProgramAD:
type: http
behavior: classical
url: https://raw.staticdn.net/ACL4SSR/ACL4SSR/master/Clash/Providers/BanProgramAD.yaml
path: ./ACL4SSR/BanProgramAD.yaml
interval: 86400
rules:
- IP-CIDR,192.168.0.0/16,本地
- IP-CIDR,10.0.0.0/8,本地
- IP-CIDR,172.16.0.0/12,本地
- IP-CIDR,127.0.0.0/8,本地
- IP-CIDR6,fe00::/8,本地
- IP-CIDR6,fd00::/8,本地
- RULE-SET,秋风广告规则,广告
- RULE-SET,BanAD,广告
- RULE-SET,BanEasyList,广告
- RULE-SET,BanEasyListChina,广告
- RULE-SET,BanEasyPrivacy,广告
- RULE-SET,BanProgramAD,广告
- GEOIP,CN,国内
- MATCH,公网
Description
我在家里有一个服务器,通过Zerotier和Tailscale以及IPv6公网连接其上的Socks5代理,在使用Premium内核时,一切都正常工作,但当我切换为Mihomo内核时,Zerotier和Tailscale上的代理失效了,但直接使用tcping检查连接(在虚拟局域网对应的接口上)仍有效。
Reproduction Steps
第一步:建立一个基于Zerotier或者Tailscale的虚拟局域网
第二步:使用虚拟局域网连接两台主机,在其中一台运行Socks5服务器,另一台通过Mihomo连接服务器
第三步:复现问题
Logs
No response
Mihomo它傻傻的只走wan口的,不会看主机路由表的,走非wan口需要配置指定出口端口
Mihomo它傻傻的只走wan口的,不会看主机路由表的,走飞wan口需要配置指定出口端口
PR welcome
PR welcome
抱歉,不会coding啊 :(
Mihomo它傻傻的只走wan口的,不会看主机路由表的,走非wan口需要配置指定出口端口
对的,这个已经有对应的配置项了: https://wiki.metacubex.one/config/proxies/#interface-name
实测在使用 Tailscale 时将节点的 interface-name
指定为 tailscale0
是可以使用虚拟局域网内其他主机上搭的节点的,当然前提是 Tailscale 已经正确地配置了 subnet router。
感谢
解决方案:在节点配置中设置interface-name
,如windows下我用ZT和TS,分别对应ZeroTier One [xxxxxxxxxxxxxxxx]
和Tailscale
然后204就通了