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)

This commit is contained in:
sganggs committed 2026-10-03 23:01:41 +08:00
1 parent 2a03467897
commit 945c9f3ee8
1 file changed
+2 -2
+2 -2
View File
@@ -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;