2dust / v2rayN

A GUI client for Windows, support Xray core and v2fly core and others
https://1.2345345.xyz
GNU General Public License v3.0
64.22k stars 10.9k forks source link

[Bug]: 启用Tun模式后,sing-box.exe跑满CPU,同时直连有2M/s以上的上传速度。 #3676

Closed wirsnow closed 1 year ago

wirsnow commented 1 year ago

预期情况

不清楚,这模式是用来全局代理的吧。

实际情况

启用Tun模式后,sing-box.exe跑满CPU,同时直连有2M/s以上的上传速度。 日志一直出这些: 2023/04/12 20:42:09 udp:127.0.0.1:60019 accepted udp:8.8.8.8:53 [socks -> direct] 2023/04/12 20:42:12 udp:127.0.0.1:56709 accepted udp:8.8.8.8:53 [socks -> direct] 2023/04/12 20:42:16 udp:127.0.0.1:56714 accepted udp:8.8.8.8:53 [socks -> direct] 2023/04/12 20:42:22 udp:127.0.0.1:56722 accepted udp:8.8.8.8:53 [socks -> direct] 2023/04/12 20:42:26 udp:127.0.0.1:56724 accepted udp:8.8.8.8:53 [socks -> direct] QQ截图20230412204153 QQ截图20230412204141

开启日志选项后,弹出的第一个控制台输出如下:

+0800 2023-04-12 20:55:38 INFO router: loaded geosite database: 1329 codes
+0800 2023-04-12 20:55:38 INFO router: updated default interface WLAN 2, index 22

第一个控制台消失后,第二个控制台输出刷屏(这些是一部分):

+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange FDEOEPFHCACACACACACACACACACACACA. IN NIMLOC
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange edge.microsoft.com. IN A
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange FHEPFCELEHFCEPFFFACACACACACACAAA. IN NIMLOC
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange FHEPFCELEHFCEPFFFACACACACACACAAA. IN NIMLOC
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange FDEOEPFHCACACACACACACACACACACACA. IN NIMLOC
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange FHEPFCELEHFCEPFFFACACACACACACAAA. IN NIMLOC
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange www.msftconnecttest.com. IN A
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange edge.microsoft.com. IN A
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange FDEOEPFHCACACACACACACACACACACACA. IN NIMLOC
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange FDEOEPFHCACACACACACACACACACACAAA. IN NIMLOC
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange FDEOEPFHCACACACACACACACACACACAAA. IN NIMLOC
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange edge.microsoft.com. IN A
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange FDEOEPFHCACACACACACACACACACACAAA. IN NIMLOC
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange www.msftconnecttest.com. IN A
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange www.msftconnecttest.com. IN A
+0800 2023-04-12 20:55:57 DEBUG [2976293081] dns: exchange FDEOEPFHCACACACACACACACACACACAAA. IN NIMLOC

复现方法

开启Tun模式。 路由改全局之后好了,好像是我的规则设置的问题,但也不知道哪出了问题(

日志信息

2023-04-02

2023-04-12 20:52:34.0749-INFO v2rayN start up | v2rayN - V6.21 - 2023/04/07 | D:\v2rayN\v2rayN.exe
2023-04-12 20:52:40.0526-INFO Tun mode configuration file test start
2023-04-12 20:52:42.1647-INFO Tun mode configuration file test end
2023-04-12 20:53:05.5936-INFO Tun mode monitors restart

Vaccess_2023-04-12.txt

2023/04/12 20:52:34 127.0.0.1:1083 accepted tcp:127.0.0.1:0 [api -> api]
2023/04/12 20:52:35 127.0.0.1:1085 accepted //www.google.com:443 [http -> proxy]
2023/04/12 20:53:05 udp:127.0.0.1:64285 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:15 udp:127.0.0.1:53537 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:15 udp:127.0.0.1:53539 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:15 udp:127.0.0.1:53541 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:16 udp:127.0.0.1:53543 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53545 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53547 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53549 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53551 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53553 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53555 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53557 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53559 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53561 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53563 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53565 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53567 accepted udp:8.8.8.8:53 [socks -> direct]
2023/04/12 20:53:17 udp:127.0.0.1:53569 accepted udp:8.8.8.8:53 [socks -> direct]

Verror_2023-04-12.txt

2023/04/12 20:52:34 [Warning] core: Xray 1.8.0 started

额外信息

No response

我确认已更新至最新版本

我确认已查询历史issues

wirsnow commented 1 year ago

看了一下之前大家提出的issue,这个bug在上一个版本就有了; 大概率是路由设置的问题,我现在用的规则用了很久了,自定义的网址有上百条,同时用了增强版的Geo files; QQ截图20230412211455

尝试了自带的几个规则,都没有出现这种情况,只有自定义的会出问题(最后一个) QQ截图20230412211544 QQ截图20230412211615 QQ截图20230412211629 QQ截图20230412211558

看来没修好之前只能用proxifier了 :(

Trudeau566 commented 1 year ago

把8.8.8.8加入代理规则

2dust commented 1 year ago

看日志,把8.8.8.8代理

把下面的加入到proxy 的IP

geoip:cloudflare,
geoip:cloudfront,
geoip:facebook,
geoip:fastly,
geoip:google,
geoip:netflix,
geoip:telegram,
geoip:twitter
wirsnow commented 1 year ago

@2dust

看日志,把8.8.8.8代理

把下面的加入到proxy 的IP

geoip:cloudflare,
geoip:cloudfront,
geoip:facebook,
geoip:fastly,
geoip:google,
geoip:netflix,
geoip:telegram,
geoip:twitter

刚刚试过了,无论是加到代理、直连、屏蔽;清除系统代理或自动配置系统代理。 都会刷

2023/04/13 10:03:42 udp:127.0.0.1:50954 accepted udp:8.8.8.8:53 [socks -> direct]

看了一下,sing-box.exe的日志一直在循环这些:

+0800 2023-04-13 10:08:57 ERROR [477860782] dns: exchange failed for www.msftconnecttest.com. IN A: write udp 127.0.0.1:58027->127.0.0.1:10808: use of closed network connection
+0800 2023-04-13 10:08:57 ERROR [477860782] dns: exchange failed for FDEOEPFHCACACACACACACACACACACAAA. IN NIMLOC: write udp 127.0.0.1:58027->127.0.0.1:10808: use of closed network connection
+0800 2023-04-13 10:08:57 ERROR [477860782] dns: exchange failed for www.msftconnecttest.com. IN A: write udp 127.0.0.1:58027->127.0.0.1:10808: use of closed network connection
+0800 2023-04-13 10:08:57 ERROR [477860782] dns: exchange failed for FDEOEPFHCACACACACACACACACACACACA. IN NIMLOC: write udp 127.0.0.1:58027->127.0.0.1:10808: use of closed network connection
+0800 2023-04-13 10:08:57 ERROR [477860782] dns: exchange failed for FDEOEPFHCACACACACACACACACACACACA. IN NIMLOC: write udp 127.0.0.1:58027->127.0.0.1:10808: use of closed network connection
+0800 2023-04-13 10:08:57 ERROR [477860782] dns: exchange failed for media.st.dl.eccdnx.com. IN A: write udp 127.0.0.1:58025->127.0.0.1:10808: use of closed network connection
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange www.msftconnecttest.com. IN A
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange FDEOEPFHCACACACACACACACACACACAAA. IN NIMLOC
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange FDEOEPFHCACACACACACACACACACACACA. IN NIMLOC
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange FHEPFCELEHFCEPFFFACACACACACACAAA. IN NIMLOC
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange FDEOEPFHCACACACACACACACACACACACA. IN NIMLOC
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange FHEPFCELEHFCEPFFFACACACACACACAAA. IN NIMLOC
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange media.st.dl.eccdnx.com. IN A
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange FDEOEPFHCACACACACACACACACACACAAA. IN NIMLOC
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange FHEPFCELEHFCEPFFFACACACACACACAAA. IN NIMLOC
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange FDEOEPFHCACACACACACACACACACACAAA. IN NIMLOC
+0800 2023-04-13 10:19:10 DEBUG [3323392659] dns: exchange media.st.dl.eccdnx.com. IN A
+0800 2023-04-13 10:21:11 ERROR [3555174693] dns: exchange failed for fe2cr.update.microsoft.com. IN A: write udp 127.0.0.1:54795->127.0.0.1:10808: use of closed network connection
+0800 2023-04-13 10:21:11 ERROR [3555174693] dns: exchange failed for fe2cr.update.microsoft.com. IN A: write udp 127.0.0.1:54797->127.0.0.1:10808: use of closed network connection
+0800 2023-04-13 10:21:11 ERROR [3555174693] dns: exchange failed for FDEOEPFHCACACACACACACACACACACAAA. IN NIMLOC: write udp 127.0.0.1:54795->127.0.0.1:10808: use of closed network connection
+0800 2023-04-13 10:21:11 INFO [3655905567] inbound/tun[tun-in]: inbound packet connection from 172.19.0.1:54774

然而我规则里没这几个链接

fe2cr.update.microsoft.com
www.msftconnecttest.com
media.st.dl.eccdnx.com

尝试把这几个加到代理规则也是一样的 :(

guiConfigs/config.json: (我把订阅链接删了)

{
  "policy": {
    "system": {
      "statsOutboundUplink": true,
      "statsOutboundDownlink": true
    }
  },
  "log": {
    "access": "",
    "error": "",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "tag": "socks",
      "port": 10808,
      "listen": "127.0.0.1",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ],
        "routeOnly": false
      },
      "settings": {
        "auth": "noauth",
        "udp": true,
        "allowTransparent": false
      }
    },
    {
      "tag": "http",
      "port": 10809,
      "listen": "127.0.0.1",
      "protocol": "http",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ],
        "routeOnly": false
      },
      "settings": {
        "auth": "noauth",
        "udp": true,
        "allowTransparent": false
      }
    },
    {
      "tag": "api",
      "port": 30497,
      "listen": "127.0.0.1",
      "protocol": "dokodemo-door",
      "settings": {
        "udp": false,
        "address": "127.0.0.1",
        "allowTransparent": false
      }
    }
  ],
  "outbounds": [
    {
      "tag": "proxy",
      "protocol": "shadowsocks",
      "settings": {
        "servers": [
          {
            "address": "",
            "method": "",
            "ota": false,
            "password": "",
            "port": ,
            "level": 1
          }
        ]
      },
      "streamSettings": {
        "network": "tcp"
      },
      "mux": {
        "enabled": false,
        "concurrency": -1
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "block",
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "http"
        }
      }
    }
  ],
  "stats": {},
  "api": {
    "tag": "api",
    "services": [
      "StatsService"
    ]
  },
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "type": "field",
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api",
        "enabled": true
      },
      {
        "id": "4725842148974749579",
        "type": "field",
        "outboundTag": "proxy",
        "domain": [
          "geosite:gfw",
          "geosite:greatfire",
          "geoip:cloudflare",
          "geoip:cloudfront",
          "geoip:facebook",
          "geoip:fastly",
          "geoip:google",
          "geoip:netflix",
          "geoip:telegram",
          "geoip:twitter",
          "8.8.8.8",
          "fe2cr.update.microsoft.com",
          "www.msftconnecttest.com",
          "media.st.dl.eccdnx.com"
        ],
        "enabled": true
      },
      {
        "id": "5165210694284068260",
        "type": "field",
        "outboundTag": "direct",
        "domain": [
          "download.pytorch.org",
          "browser.pipe.aria.microsoft.com",
          "app.adjust.com",
          "static-tapad.tapdb.net",
          "codeload.github.com",
          "c.msn.com",
          "395d05f13e4ea6707cc8b23720fde509.clo.footprintdns.com"
        ],
        "enabled": true
      },
      {
        "id": "5664775178479447951",
        "type": "field",
        "outboundTag": "proxy",
        "domain": [
          "steamdb.info",
          "steam-chat.com",
          "steamcommunity.com",
          "akamai.steamstatic.com",
          "help.steampowered.com",
          "store.steampowered.com",
          "community.steamstatic.com",
          "store.cloudflare.steamstatic.com",
          "community.cloudflare.steamstatic.com",
          "www.epicgames.com",
          "tracking.epicgames.com",
          "datarouter.ol.epicgames.com",
          "launcher.store.epicgames.com",
          "talon-service-prod.ecosec.on.epicgames.com",
          "auth.gog.com",
          "insights-collector.gog.com",
          "www.bing.com",
          "msedge.net",
          "xboxlive.com",
          "storage.live.com",
          "onedrive.live.com",
          "www.bingapis.com",
          "info.microsoft.com",
          "rewards.microsoft.com",
          "odc.officeapps.live.com",
          "forestryforminecraft.info",
          "developer.microsoft.com",
          "cdn.odc.officeapps.live.com",
          "checkappexec.microsoft.com",
          "browserdefaults.microsoft.com",
          "prod.rewardsplatform.microsoft.com",
          "glitch.me",
          "github.com",
          "alive.github.com",
          "githubusercontent.com",
          "github.githubassets.com",
          "raw.githubusercontent.com",
          "hcaptcha.com",
          "js.hcaptcha.com",
          "captcha.website",
          "newassets.hcaptcha.com",
          "mail.google.com",
          "www.gstatic.com",
          "translate.google.com",
          "accounts.google.com",
          "translate.google.com.hk",
          "accounts.google.com.hk",
          "translate.googleapis.com",
          "trovegame.com",
          "triongames.com",
          "trionworlds.com",
          "dal.triongames.com",
          "store.trionworlds.com",
          "glyph.trionworlds.com",
          "session.trionworlds.com",
          "webcdn.triongames.com",
          "client.downloader.gamigo.com",
          "dal-c35-b05.dal.triongames.com",
          "dal-c35-b06.dal.triongames.com",
          "dal-c35-b07.dal.triongames.com",
          "dal-c35-b08.dal.triongames.com",
          "dal-c35-b09.dal.triongames.com",
          "trove-update.dyn.triongames.com",
          "trove-pc-live-us-game-3.trovegame.com",
          "20.205.156.5",
          "warframe.com",
          "api.warframe.com",
          "www.warframe.com",
          "n9e5v4d8.ssl.hwcdn.net",
          "nexusmods.com",
          "nexu2.cdnrobot.xyz",
          "users.nexusmods.com",
          "aka.ms",
          "akamaihd.net",
          "img-s-msn-com.akamaized.net",
          "steamuserimages-a.akamaihd.net",
          "posit.co",
          "twitch.tv",
          "zlibrary.to",
          "prettier.io",
          "ai117.com",
          "deepl.com",
          "yahoo.com",
          "zerossl.com",
          "freegpt.one",
          "ludeon.com",
          "br.sidoh.org",
          "acgknow.me",
          "crowdin.com",
          "live.leisu.com",
          "wakatime.com",
          "tfd.nexon.com",
          "asgardia.space",
          "www.bing.com",
          "chocolatey.org",
          "chatbot.theb.ai",
          "asiantolick.com",
          "telegranna.com",
          "api1.origin.com",
          "overthewire.org",
          "chat.openai.com",
          "www.vikacg.com",
          "www.lostlife.club",
          "www.bscotch.net",
          "www.rstudio.com",
          "www.hmoe11.net",
          "legacygames.com",
          "hub.jetbrains.com",
          "forestry.sengir.net",
          "www.freenom.com",
          "repack-games.com",
          "storage.lostlife.club",
          "www.spacedesk.net",
          "www.supereasy.com",
          "www.curseforge.com",
          "dropt.readthedocs.io",
          "www.alphavantage.co",
          "account.jetbrains.com",
          "telemetry-in.battle.net",
          "api.gameanalytics.com",
          "minecraft.fandom.com",
          "www.dogfight360.com",
          "s6r5v2u5.ssl.hwcdn.net",
          "static.wikia.nocookie.net",
          "data-api.similarsites.com",
          "accounts.starbreeze.com",
          "hub-binder.mybinder.ovh",
          "vz-0823c98a-4c8.b-cdn.net",
          "terraria-calamity-mod.fandom.com",
          "drpf-diena.proxima.nie.easebar.com",
          "jupyter-contrib-nbextensions.readthedocs.io",
          "openaicom-api-bdcpf8c6d2e9atf6.z01.azurefd.net"
        ],
        "enabled": true
      },
      {
        "id": "5111890341676864969",
        "type": "field",
        "outboundTag": "block",
        "domain": [
          "geosite:category-ads-all",
          "mousegesturesapi.com"
        ],
        "enabled": true
      },
      {
        "id": "5564795238854381039",
        "type": "field",
        "outboundTag": "direct",
        "domain": [
          "bitwarden.com",
          "bitwarden.net",
          "baiyunju.cc",
          "letsencrypt.org",
          "adblockplus.org",
          "safesugar.net",
          "googleads.g.doubleclick.net",
          "adservice.google.com",
          "license.piriform.com",
          "static-cdn.jtvnw.net",
          "pypi.tuna.tsinghua.edu.cn",
          "tuna.tsinghua.edu.cn",
          "geosite:category-games@cn",
          "geosite:steam@cn",
          "geosite:private",
          "geosite:cn",
          "geosite:adobe",
          "geosite:adobe-activation",
          "geosite:microsoft",
          "geosite:msn",
          "geosite:apple",
          "geosite:google-cn",
          "geosite:apple-cn"
        ],
        "enabled": true
      },
      {
        "id": "4972798012980855122",
        "type": "field",
        "port": "0-65535",
        "outboundTag": "direct",
        "enabled": true
      }
    ]
  }
}

谢谢!

2dust commented 1 year ago

geoip:google或者8.8.8.8要加入到IP,不是domain

wirsnow commented 1 year ago

geoip:google或者8.8.8.8要加入到IP,不是domain

感谢!问题解决了,要关闭这个吗? @2dust

不过一堆这个,很奇怪,不影响使用

udp:127.0.0.1:61935 accepted udp:8.8.8.8:53 [socks -> proxy]
keypadDancer commented 2 months ago

大佬怎么解决的 我的tun模式下报错 initial rule-set: geosite-gfw: unexpected status: 404 Not Found