#4276·sing-box

[sfm] memory increases constantly whenever you restart sfm immediately(same config)

Author: SheldontaoCreated Jul 7, 2026Updated Sep 16, 2026
Labelsbug

Operating system

macOS

System version

macos27

Installation type

sing-box for macOS Graphical Client

If you are using a graphical client, please provide the version of the client.

1.14.beta39

Version

bash

Description

memory increases constantly whenever you restart sfm(same config).

Image Image Image

Reproduction

restart sfm

json
{
  "log": {
    "level": "warn",
    "output": "sing-box.log",
    "timestamp": true
  },
  "dns": {
    "servers": [
      {
        "type": "https",
        "tag": "dns_proxy",
        "detour": "proxy",
        "server": "8.8.8.8"
      },
      {
        "type": "hosts",
        "tag": "hosts"
      },
      {
        "type": "local",
        "tag": "local"
      },
      {
        "type": "quic",
        "tag": "dns_direct",
        "server": "223.5.5.5"
      },
      {
        "type": "fakeip",
        "tag": "fakeip",
        "inet4_range": "198.18.0.0/15",
        "inet6_range": "fc00::/18"
      }
    ],
    "rules": [
      {
        "preferred_by": "hosts",
        "server": "hosts"
      },
      {
        "clash_mode": "Direct",
        "server": "local"
      },
      {
        "clash_mode": "Global",
        "server": "fakeip"
      },
      {
        "type": "logical",
        "mode": "and",
        "rules": [
          {
            "clash_mode": "AllowAds",
            "invert": true
          },
          {
            "rule_set": "ads"
          }
        ],
        "action": "predefined"
      },
      {
        "domain_suffix": [".local", ".lan", "miwifi.com"],
        "rule_set": ["private", "bilibili_domain", "apple_cn"],
        "server": "local"
      },
      {
        "process_name": [
          "Microsoft Outlook",
          "motrix-next-engine",
          "aria2c.exe",
          "fdm.exe",
          "folx.exe",
          "nettransport.exe",
          "thunder.exe",
          "transmission.exe",
          "utorrent.exe",
          "webtorrent.exe",
          "webtorrent helper.exe",
          "qbittorrent.exe",
          "downloadservice.exe",
          "weiyun.exe",
          "baidunetdisk.exe"
        ],
        "server": "local"
      },
      {
        "domain": ["ghfast.top", "cdn.jsdelivr.net"],
        "domain_suffix": [
          "tplogin.cn",
          "router.asus.com",
          "tendawifi.com",
          "tplinkwifi.net",
          "app-measurement.com",
          "hm.baidu.com",
          "firebaselogging.googleapis.com",
          "firebaselogging-pa.googleapis.com",
          "beacons.gvt2.com",
          "beacons2.gvt2.com",
          "beacons3.gvt2.com",
          "tracking.miui.com",
          "market.xiaomi.com",
          "lancache.steamcontent.com"
        ],
        "rule_set": ["cn_domain", "microsoft@cn"],
        "server": "dns_direct"
      },
      {
        "query_type": ["A", "AAAA"],
        "rule_set": "proxy_domain",
        "server": "fakeip"
      },
      {
        "rule_set": "proxy_domain",
        "invert": true,
        "action": "evaluate",
        "server": "dns_proxy",
        "client_subnet": "114.114.114.114/24"
      },
      {
        "rule_set": "cn_ip",
        "match_response": true,
        "server": "local"
      },
      {
        "query_type": ["A", "AAAA"],
        "server": "fakeip"
      }
    ],
    "final": "dns_proxy",
    "optimistic": true
  },
  "ntp": {
    "enabled": true,
    "interval": "30m0s",
    "server": "ntp.aliyun.com",
    "server_port": 123
  },
  "http_clients": [
    {
      "tag": "proxy_client",
      "version": 2,
      "headers": {
        "Authorization": ""
      },
      "detour": "proxy",
      "stream_receive_window": 0,
      "connection_receive_window": 0
    }
  ],
  "inbounds": [
    {
      "type": "tun",
      "address": ["172.18.0.1/30", "fdfe:dcba:9876::1/126"],
      "auto_route": true,
      "loopback_address": "10.7.0.1",
      "stack": "mixed",
      "platform": {
        "http_proxy": {
          "enabled": true,
          "server": "127.0.0.1",
          "server_port": 7890
        }
      }
    },
    {
      "type": "mixed",
      "listen": "127.0.0.1",
      "listen_port": 7890
    }
  ],
  "outbounds": [
    {
      "type": "selector",
      "tag": "proxy",
      "outbounds": [
        "hk-auto",
        "tw-auto",
        "jp-auto",
        "sg-auto",
        "us-auto",
        "noCN-auto",
        "all"
      ],
      "default": "noCN-auto"
    },
    {
      "type": "selector",
      "tag": "ai",
      "outbounds": [
        "proxy",
        "direct",
        "hk-auto",
        "tw-auto",
        "jp-auto",
        "sg-auto",
        "us-auto",
        "noCN-auto",
        "all"
      ],
      "default": "us-auto"
    },
    {
      "type": "selector",
      "tag": "telegram",
      "outbounds": [
        "proxy",
        "direct",
        "hk-auto",
        "tw-auto",
        "jp-auto",
        "sg-auto",
        "us-auto",
        "all"
      ]
    },
    {
      "type": "selector",
      "tag": "emby",
      "outbounds": [
        "proxy",
        "direct",
        "hk-auto",
        "tw-auto",
        "jp-auto",
        "sg-auto",
        "us-auto",
        "all"
      ]
    },
    {
      "type": "selector",
      "tag": "google",
      "outbounds": [
        "proxy",
        "direct",
        "hk-auto",
        "tw-auto",
        "jp-auto",
        "sg-auto",
        "us-auto",
        "noCN-auto",
        "all"
      ]
    },
    {
      "type": "selector",
      "tag": "streaming",
      "outbounds": [
        "proxy",
        "direct",
        "hk-auto",
        "tw-auto",
        "jp-auto",
        "sg-auto",
        "us-auto",
        "all"
      ],
      "default": "direct"
    },
    {
      "type": "selector",
      "tag": "github",
      "outbounds": [
        "proxy",
        "direct",
        "hk-auto",
        "tw-auto",
        "jp-auto",
        "sg-auto",
        "us-auto",
        "all"
      ],
      "default": "us-auto"
    },
    {
      "type": "selector",
      "tag": "microsoft@cn",
      "outbounds": [
        "proxy",
        "direct",
        "hk-auto",
        "tw-auto",
        "jp-auto",
        "sg-auto",
        "us-auto",
        "all"
      ],
      "default": "direct"
    },
    {
      "type": "selector",
      "tag": "bilibili",
      "outbounds": [
        "proxy",
        "direct",
        "hk-auto",
        "tw-auto",
        "jp-auto",
        "sg-auto",
        "us-auto",
        "all"
      ],
      "default": "direct"
    },
    {
      "type": "selector",
      "tag": "cn",
      "outbounds": [
        "proxy",
        "direct",
        "hk-auto",
        "tw-auto",
        "jp-auto",
        "sg-auto",
        "us-auto",
        "all"
      ],
      "default": "direct"
    },
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "urltest",
      "tag": "noCN-auto",
      "outbounds": [],
      "interval": "2m0s",
      "interrupt_exist_connections": true
    },
    {
      "type": "urltest",
      "tag": "hk-auto",
      "outbounds": [],
      "interval": "2m0s",
      "interrupt_exist_connections": true
    },
    {
      "type": "urltest",
      "tag": "tw-auto",
      "outbounds": [],
      "interval": "2m0s",
      "interrupt_exist_connections": true
    },
    {
      "type": "urltest",
      "tag": "jp-auto",
      "outbounds": [],
      "interval": "2m0s",
      "interrupt_exist_connections": true
    },
    {
      "type": "urltest",
      "tag": "sg-auto",
      "outbounds": [],
      "interval": "2m0s",
      "interrupt_exist_connections": true
    },
    {
      "type": "urltest",
      "tag": "us-auto",
      "outbounds": [],
      "interval": "2m0s",
      "interrupt_exist_connections": true
    },
    {
      "type": "selector",
      "tag": "all",
      "outbounds": []
    }
  ],
  "route": {
    "rules": [
      {
        "ip_is_private": true,
        "outbound": "direct"
      },
      {
        "clash_mode": "Global",
        "outbound": "all"
      },
      {
        "clash_mode": "Direct",
        "outbound": "direct"
      },
      {
        "process_name": [
          "Microsoft Outlook",
          "motrix-next-engine",
          "aria2c.exe",
          "fdm.exe",
          "folx.exe",
          "nettransport.exe",
          "thunder.exe",
          "transmission.exe",
          "utorrent.exe",
          "webtorrent.exe",
          "webtorrent helper.exe",
          "qbittorrent.exe",
          "downloadservice.exe",
          "weiyun.exe",
          "baidunetdisk.exe"
        ],
        "outbound": "direct"
      },
      {
        "rule_set": "telegram_ip",
        "outbound": "telegram"
      },
      {
        "rule_set": "cn_ip",
        "outbound": "cn"
      },
      {
        "action": "sniff"
      },
      {
        "type": "logical",
        "mode": "and",
        "rules": [
          {
            "protocol": "stun"
          },
          {
            "rule_set": "cn_ip",
            "invert": true
          }
        ],
        "action": "reject"
      },
      {
        "type": "logical",
        "mode": "and",
        "rules": [
          {
            "clash_mode": "AllowAds",
            "invert": true
          },
          {
            "rule_set": "ads"
          }
        ],
        "action": "reject"
      },
      {
        "rule_set": "ai_domain",
        "outbound": "ai"
      },
      {
        "rule_set": "telegram_domain",
        "outbound": "telegram"
      },
      {
        "rule_set": ["youtube_domain", "netflix_domain"],
        "outbound": "streaming"
      },
      {
        "rule_set": ["google_domain", "google_ip"],
        "outbound": "google"
      },
      {
        "domain_keyword": "emby.",
        "rule_set": "emby",
        "outbound": "emby"
      },
      {
        "rule_set": "github",
        "outbound": "github"
      },
      {
        "rule_set": "microsoft@cn",
        "outbound": "microsoft@cn"
      },
      {
        "rule_set": "bilibili_domain",
        "outbound": "bilibili"
      },
      {
        "domain": "captive.apple.com",
        "domain_suffix": "wiwide.com",
        "outbound": "direct"
      },
      {
        "domain": "apps.apple.com",
        "outbound": "proxy"
      },
      {
        "domain_suffix": "miwifi.com",
        "rule_set": ["cn_domain", "apple_cn"],
        "outbound": "cn"
      }
    ],
    "rule_set": [
      {
        "type": "remote",
        "tag": "microsoft@cn",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/[email protected]"
      },
      {
        "type": "remote",
        "tag": "apple_cn",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/apple-cn.srs"
      },
      {
        "type": "remote",
        "tag": "bilibili_domain",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo-lite/geosite/bilibili.srs"
      },
      {
        "type": "remote",
        "tag": "cn_ip",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geoip/cn.srs"
      },
      {
        "type": "remote",
        "tag": "cn_domain",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo-lite/geosite/cn.srs"
      },
      {
        "type": "remote",
        "tag": "google_domain",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo-lite/geosite/google.srs"
      },
      {
        "type": "remote",
        "tag": "google_ip",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo-lite/geoip/google.srs"
      },
      {
        "type": "remote",
        "tag": "netflix_domain",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo-lite/geosite/netflix.srs"
      },
      {
        "type": "remote",
        "tag": "ai_domain",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/category-ai-chat-!cn.srs"
      },
      {
        "type": "remote",
        "tag": "proxy_domain",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/geolocation-!cn.srs"
      },
      {
        "type": "remote",
        "tag": "telegram_ip",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo-lite/geoip/telegram.srs"
      },
      {
        "type": "remote",
        "tag": "telegram_domain",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo-lite/geosite/telegram.srs"
      },
      {
        "type": "remote",
        "tag": "youtube_domain",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo-lite/geosite/youtube.srs"
      },
      {
        "type": "remote",
        "tag": "ads",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/[email protected]"
      },
      {
        "type": "remote",
        "tag": "private",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/private.srs"
      },
      {
        "type": "remote",
        "tag": "github",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/github.srs"
      },
      {
        "type": "remote",
        "tag": "emby",
        "url": "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/sing/geo/geosite/category-emby.srs"
      }
    ],
    "final": "proxy",
    "auto_detect_interface": true,
    "default_domain_resolver": "dns_direct",
    "default_http_client": "proxy_client"
  },
  "experimental": {
    "cache_file": {
      "enabled": true,
      "store_fakeip": true
    },
    "clash_api": {
      "external_controller": "127.0.0.1:9090",
      "external_ui": "ClashUIforSingbox",
      "external_ui_download_url": "https://github.com/Zephyruso/zashboard/releases/latest/download/dist-no-fonts.zip"
    }
  }
}

Logs

bash

Supporter

Integrity requirements

  • I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
  • I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
  • I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
  • I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.