From 945c9f3ee811b8886d44c53a6b7c0eb902e82e3a Mon Sep 17 00:00:00 2001 From: sganggs Date: Sat, 3 Oct 2026 23:01:41 +0800 Subject: [PATCH] feedback2 WE: tools/doctor.mjs says directly that tun0 / tap0 are matched first by VPN_IF (substring tun\d / tap) and classed as vpn (comment only, after PR #27) --- tools/doctor.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/doctor.mjs b/tools/doctor.mjs index bd658024..c7c53add 100755 --- a/tools/doctor.mjs +++ b/tools/doctor.mjs @@ -25,8 +25,8 @@ import { // --------------------------------------------------------------------------------------------------- // 名字里带这些的网卡不对局域网开放:虚拟机 / 容器 / WSL / 代理软件的 TUN 适配器(Mihomo、Clash)。 -// 这里不再列 `^tun\d`:下面 VPN_IF 的 `tun\d` 先判定,任何能被 `^tun\d` 命中的名字也一定被它命中, -// 于是 tun0/tap0 一律归为 vpn(那正是同组好友互连用的地址)。写在两处只会让人以为顺序无关。 +// tun0 / tap0 不归这一类:classifyAddresses 先判下面的 VPN_IF,它的 `tun\d` / `tap` 是子串匹配, +// tun0 / tap0 先被它命中,归为 vpn(那正是同组好友互连用的地址)。 const VIRTUAL_IF = /(vethernet|virtualbox|vmware|vmnet|docker|^br-|^veth|wsl|hyper-v|vboxnet|bridge\d|utun|awdl|llw|parallels|loopback|mihomo|clash|sing-?box)/i; // 点对点 VPN:这些地址就是同组好友互相访问用的(Tailscale / ZeroTier / WireGuard / Radmin VPN / Hamachi)。 const VPN_IF = /(tailscale|zerotier|^zt|wireguard|^wg\d|tun\d|tap|radmin|hamachi)/i;