mellow-io / mellow

Mellow is a rule-based global transparent proxy client for Windows, macOS and Linux. Also a Proxifier alternative.
3.54k stars 471 forks source link

长时间系统休眠后,会自动退出并且没有任何相关 log #297

Closed Ir1Ka closed 3 years ago

Ir1Ka commented 3 years ago

使用操作系统类型以及版本

版本:Windows 10 家庭中文版 版本号:1909 操作系统版本:18363.1139

使用 Mellow 版本

v0.1.22

问题描述

笔记本合上盖子后,系统休眠。经过较长时间后,打开盖子会发现无法联网(Google),状态栏 Mellow 已亮起,鼠标移动到 Mellow 图标上后,图标消失。 查看 Mellow 的 log,没有发现任何与错误退出相关的 log。

问题复现步骤

  1. 合上盖子
  2. 经过较长时间,比如一晚上(18:00 - 9:00)
  3. 打开盖子

相关配置

{
  "log": {
    "loglevel": "warning"
  },
  "dns": {
    "servers": [
      {
        "address": "223.5.5.5",
        "port": 53,
        "domains": [
          "geosite:cn"
        ]
      },
      {
        "address": "8.8.8.8",
        "port": 53,
        "domains": [
          "geosite:geolocation-!cn",
          "domain:google.com"
        ]
      },
      "8.8.4.4"
    ],
    "hosts": {
      "localhost": "127.0.0.1"
    }
  },
  "outbounds": [
    {
      "protocol": "freedom",
      "tag": "Direct",
      "settings": {
        "domainStrategy": "UseIP"
      }
    },
    {
      "protocol": "blackhole",
      "tag": "Reject"
    },
    {
      "protocol": "dns",
      "tag": "Dns-Out",
      "settings": {}
    },
    {
      "protocol": "socks",
      "tag": "Socks-Out",
      "settings": {
        "servers": [
          {
            "address": "127.0.0.1",
            "port": 1080
          }
        ]
      }
    },
    {
      "protocol": "shadowsocks",
      "tag": "Proxy-9",
      "settings": {
        "servers": [
          {
            "method": "aes-128-gcm",
            "password": "password~111",
            "address": "xxx.yyy.zzz",
            "port": 111
          }
        ]
      },
      "proxySettings": {
        "tag": "Proxy-9-v2ray-plugin"
      }
    },
    {
      "tag": "Proxy-9-v2ray-plugin",
      "protocol": "freedom",
      "settings": {
        "redirect": "xxx.yyy.zzz:111"
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
          "path": "/"
        },
        "security": "tls",
        "tlsSettings": {
          "serverName": "xxx.yyy.zzz"
        }
      },
      "mux": {
        "enabled": true
      }
    }
  ],
  "routing": {
    "balancers": [
      {
        "tag": "Group-1",
        "selector": [
          "Proxy-9"
        ],
        "strategy": "latency",
        "interval": 300,
        "timeout": 6
      }
    ],
    "rules": [
      {
        "type": "field",
        "outboundTag": "Dns-Out",
        "inboundTag": [
          "tun2socks"
        ],
        "network": "udp",
        "port": 53
      },
      {
        "type": "field",
        "outboundTag": "Reject",
        "domain": [
          "geosite:category-ads-all"
        ]
      },
      {
        "type": "field",
        "outboundTag": "Direct",
        "ip": [
          "223.5.5.5/32"
        ]
      },
      {
        "type": "field",
        "balancerTag": "Group-1",
        "ip": [
          "8.8.8.8/32",
          "8.8.4.4/32"
        ]
      },
      {
        "type": "field",
        "outboundTag": "Direct",
        "app": [
          "ss-*",
          "sslocal",
          "Shadowsocks*",
          "shadowsocks*",
          "v2ray*",
          "cloudmusic.exe",
          "NeteaseMusic"
        ]
      },
      {
        "type": "field",
        "outboundTag": "Direct",
        "ip": [
          "geoip:cn",
          "geoip:private"
        ]
      },
      {
        "type": "field",
        "outboundTag": "Direct",
        "domain": [
          "geosite:cn"
        ]
      },
      {
        "type": "field",
        "balancerTag": "Group-1",
        "domain": [
          "geosite:geolocation-!cn",
          "domain:google.com"
        ]
      },
      {
        "type": "field",
        "balancerTag": "Group-1",
        "ip": [
          "0.0.0.0/0",
          "::/0"
        ]
      }
    ],
    "domainStrategy": "IPIfNonMatch"
  }
}

相关日志、截图

以下 log 意外退出的时间点为 2020-10-26 14:08:49.041,开盖唤醒时间点为 2020-10-26 14:08:38.336

[2020-10-23 13:09:55.680] [info] Screen locked.
[2020-10-23 13:09:56.749] [info] Device suspended.
[2020-10-23 13:09:56.754] [info] Shutting down the core.
[2020-10-23 13:09:57.075] [info] Restore 192.168.20.1 as the default gateway.
[2020-10-23 13:09:57.090] [info] Core downed.
[2020-10-23 13:09:57.097] [info] Core stopped, code 0 signal null
[2020-10-23 13:09:57.103] [info] Core will restart upon device resume.
[2020-10-23 14:12:55.928] [info] Device resumed.
[2020-10-23 14:12:57.548] [info] Screen unlocked.
[2020-10-23 14:12:59.024] [info] Retrying to get the default gateway.
[2020-10-23 14:12:59.292] [info] Original gateway is 192.168.20.1
[2020-10-23 14:12:59.301] [info] Original send through 192.168.20.2 以太网
[2020-10-23 14:12:59.321] [info] Ensuring tap device sets up correctly.
[2020-10-23 14:13:02.639] [info] TAP network device already exists.
(Re-)enabling TAP network device...

Set all adapters metric to auto.
Ok.

Ok.

Element not found.

Element not found.

Ok.

Ok.

Ok.

Ok.

Set TAP adapter metric to 0.
Ok.

Ok.

TAP network device added successfully.

[2020-10-23 14:13:02.645] [info] Set system proxy with command: "C:\Users\User\AppData\Local\Programs\Mellow\resources\src\helper\configure_proxy.bat" "off" 2887
[2020-10-23 14:13:02.699] [info] Core started.
[2020-10-23 14:13:03.079] [info] The default gateway before configuring routes:
[2020-10-23 14:13:03.084] [info] { gateway: '192.168.20.1', interface: '以太网' }
[2020-10-23 14:13:03.095] [info] 2020/10/23 14:13:02 TAP device component ID: {2F58F92F-2A84-47E6-AFA4-1A2571ADFFFF}
2020/10/23 14:13:02 TAP device name: mellow-tap0
2020/10/23 14:13:02 Set mellow-tap0 with net/mask: 10.255.0.2/255.255.255.0 through DHCP
2020/10/23 14:13:02 Set mellow-tap0 with DNS: 114.114.114.114,8.8.8.8 through DHCP

[2020-10-23 14:13:03.100] [info] 2020/10/23 14:13:03 [Warning] v2ray.com/core: V2Ray started

[2020-10-23 14:13:05.096] [info] Retrying to find the TUN interface.
[2020-10-23 14:13:05.105] [info] The TUN interface before configuring routes:
[2020-10-23 14:13:05.111] [info] { address: '10.255.0.2', interface: 'mellow-tap0' }
[2020-10-23 14:13:06.383] [info] Set 10.255.0.1 as the default gateway.
[2020-10-23 14:16:04.004] [info] Screen locked.
[2020-10-23 14:16:26.243] [info] Screen unlocked.
[2020-10-23 14:19:46.845] [info] Screen locked.
[2020-10-23 14:19:48.522] [info] Screen unlocked.
[2020-10-23 14:38:46.605] [info] Screen locked.
[2020-10-23 14:38:48.745] [info] Screen unlocked.
[2020-10-23 15:04:01.239] [info] Screen locked.
[2020-10-23 15:08:48.049] [info] Screen unlocked.
[2020-10-23 15:18:36.857] [info] Screen locked.
[2020-10-23 15:18:38.541] [info] Screen unlocked.
[2020-10-23 16:09:26.089] [info] Screen locked.
[2020-10-23 16:34:01.875] [info] Screen unlocked.
[2020-10-23 19:09:06.848] [info] Screen locked.
[2020-10-23 19:09:08.791] [info] Device suspended.
[2020-10-23 19:09:08.796] [info] Shutting down the core.
[2020-10-23 19:09:09.086] [info] Restore 192.168.20.1 as the default gateway.
[2020-10-23 19:09:09.100] [info] Core downed.
[2020-10-23 19:09:09.170] [info] Core stopped, code 0 signal null
[2020-10-23 19:09:09.176] [info] Core will restart upon device resume.
[2020-10-26 14:08:38.336] [info] Device resumed.
[2020-10-26 14:08:39.613] [info] Screen unlocked.
[2020-10-26 14:08:41.533] [info] Retrying to get the default gateway.
[2020-10-26 14:08:41.856] [info] Original gateway is 192.168.20.1
[2020-10-26 14:08:41.866] [info] Original send through 192.168.20.2 以太网
[2020-10-26 14:08:41.879] [info] Ensuring tap device sets up correctly.
[2020-10-26 14:08:45.212] [info] TAP network device already exists.
(Re-)enabling TAP network device...

Set all adapters metric to auto.
Ok.

Ok.

Element not found.

Element not found.

Ok.

Ok.

Ok.

Ok.

Set TAP adapter metric to 0.
Ok.

Ok.

TAP network device added successfully.

[2020-10-26 14:08:45.217] [info] Set system proxy with command: "C:\Users\User\AppData\Local\Programs\Mellow\resources\src\helper\configure_proxy.bat" "off" 2887
[2020-10-26 14:08:45.264] [info] Core started.
[2020-10-26 14:08:45.581] [info] The default gateway before configuring routes:
[2020-10-26 14:08:45.587] [info] { gateway: '192.168.20.1', interface: '以太网' }
[2020-10-26 14:08:45.598] [info] 2020/10/26 14:08:45 TAP device component ID: {2F58F92F-2A84-47E6-AFA4-1A2571ADFFFF}
2020/10/26 14:08:45 TAP device name: mellow-tap0
2020/10/26 14:08:45 Set mellow-tap0 with net/mask: 10.255.0.2/255.255.255.0 through DHCP
2020/10/26 14:08:45 Set mellow-tap0 with DNS: 114.114.114.114,8.8.8.8 through DHCP

[2020-10-26 14:08:45.604] [info] 2020/10/26 14:08:45 [Warning] v2ray.com/core: V2Ray started

[2020-10-26 14:08:47.597] [info] Retrying to find the TUN interface.
[2020-10-26 14:08:47.606] [info] The TUN interface before configuring routes:
[2020-10-26 14:08:47.611] [info] { address: '10.255.0.2', interface: 'mellow-tap0' }
[2020-10-26 14:08:49.041] [info] Set 10.255.0.1 as the default gateway.
[2020-10-26 14:14:42.627] [info] Mellow (0.1.22) started.
[2020-10-26 14:14:48.643] [info] Original gateway is 192.168.20.1
[2020-10-26 14:14:48.652] [info] Original send through 192.168.20.2 以太网
[2020-10-26 14:14:48.681] [info] Ensuring tap device sets up correctly.
[2020-10-26 14:14:52.539] [info] TAP network device already exists.
(Re-)enabling TAP network device...

Set all adapters metric to auto.
Ok.

Ok.

Element not found.

Element not found.

Ok.

Ok.

Ok.

Ok.

Set TAP adapter metric to 0.
Ok.

Ok.

TAP network device added successfully.

[2020-10-26 14:14:52.556] [info] Set system proxy with command: "C:\Users\User\AppData\Local\Programs\Mellow\resources\src\helper\configure_proxy.bat" "off" 2887
[2020-10-26 14:14:52.617] [info] Core started.
[2020-10-26 14:14:53.178] [info] The default gateway before configuring routes:
[2020-10-26 14:14:53.184] [info] { gateway: '192.168.20.1', interface: '以太网' }
[2020-10-26 14:14:53.195] [info] The TUN interface before configuring routes:
[2020-10-26 14:14:53.201] [info] { address: '10.255.0.2', interface: 'mellow-tap0' }
[2020-10-26 14:14:53.208] [info] 2020/10/26 14:14:52 TAP device component ID: {2F58F92F-2A84-47E6-AFA4-1A2571ADFFFF}
2020/10/26 14:14:52 TAP device name: mellow-tap0
2020/10/26 14:14:52 Set mellow-tap0 with net/mask: 10.255.0.2/255.255.255.0 through DHCP
2020/10/26 14:14:52 Set mellow-tap0 with DNS: 114.114.114.114,8.8.8.8 through DHCP

[2020-10-26 14:14:53.213] [info] 2020/10/26 14:14:53 [Warning] v2ray.com/core: V2Ray started

[2020-10-26 14:14:54.569] [info] Set 10.255.0.1 as the default gateway.
Ir1Ka commented 3 years ago

按我的理解,即使开盖唤醒后,网络环境发生变化,网络无法连接,网线拔出或wifi断开等情况发生,也应该是连接失败并保持图标熄灭(黑图标),而不是直接退出(崩溃)。 请帮忙解决该问题,因为经常需要用到笔记本睡眠和休眠,所以比较在意这个问题。谢谢。

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days