{
  "log": {
    "disabled": false,
    "level": "warn",
    "timestamp": true
  },
  "experimental": {
    "clash_api": {
      "external_controller": "0.0.0.0:9090",
      "external_ui": "./dashboard",
      "store_selected": true
    }
  },
  "dns": {
    "servers": [
      {
        "tag": "Internet-dns",
        "address": "1.0.0.1",
        "strategy": "ipv4_only",
        "detour": "Internet"
      },
      {
        "tag": "Best Latency-dns",
        "address": "1.1.1.1",
        "strategy": "ipv4_only",
        "detour": "Best Latency"
      },
      {
        "tag": "direct-dns",
        "address": "149.112.112.112",
        "strategy": "ipv4_only",
        "detour": "direct"
      },
      {
        "tag": "block-dns",
        "address": "rcode://success"
      }
    ],
    "rules": [
      {
        "domain_suffix": [
          ".arpa.",
          ".arpa"
        ],
        "server": "block-dns",
        "rewrite_ttl": 20
      },
      {
        "network": "udp",
        "port": 443,
        "server": "block-dns",
        "rewrite_ttl": 20
      },
      {
        "outbound": "Internet",
        "server": "Internet-dns",
        "rewrite_ttl": 20
      },
      {
        "outbound": "Best Latency",
        "server": "Best Latency-dns",
        "rewrite_ttl": 20
      },
      {
        "outbound": "direct",
        "server": "direct-dns",
        "rewrite_ttl": 20
      },
      {
        "outbound": "any",
        "server": "direct-dns",
        "rewrite_ttl": 20
      }
    ],
    "reverse_mapping": true,
    "strategy": "ipv4_only",
    "independent_cache": true
  },
  "inbounds": [
    {
      "type": "tproxy",
      "tag": "tproxy-in",
      "listen": "::",
      "listen_port": 9898,
      "sniff": true,
      "sniff_override_destination": true,
      "sniff_timeout": "300ms",
      "domain_strategy": "prefer_ipv4",
      "udp_timeout": 300
    }
  ],
  "outbounds": [
    {
      "type": "selector",
      "tag": "Internet",
      "outbounds": [
        "Best Latency",
        "sg.xmbb.net",
        "2.lowh.net",
        "5.lowh.net",
        "6.lowh.net",
        "sg-contabo2.1server.co",
        "sg-contabo3.1server.co"
      ]
    },
    {
      "type": "urltest",
      "tag": "Best Latency",
      "outbounds": [
        "sg.xmbb.net",
        "2.lowh.net",
        "5.lowh.net",
        "6.lowh.net",
        "sg-contabo2.1server.co",
        "sg-contabo3.1server.co"
      ],
      "url": "https://detectportal.firefox.com/success.txt",
      "interval": "1m0s"
    },
    {
      "tag": "sg.xmbb.net",
      "type": "vmess",
      "server": "104.21.8.121",
      "server_port": 80,
      "uuid": "322fced0-1daf-11ee-883c-1577c1651679",
      "security": "auto",
      "alter_id": 0,
      "global_padding": false,
      "authenticated_length": true,
      "multiplex": {
        "enabled": false,
        "protocol": "smux",
        "max_streams": 32
      },
      "transport": {
        "type": "ws",
        "path": "/files",
        "headers": {
          "Host": "sg.xmbb.net"
        },
        "max_early_data": 0,
        "early_data_header_name": "Sec-WebSocket-Protocol"
      },
      "domain_strategy": "ipv4_only"
    },
    {
      "tag": "2.lowh.net",
      "type": "vmess",
      "server": "104.21.8.121",
      "server_port": 80,
      "uuid": "99e56a30-1daf-11ee-846b-1577c1651679",
      "security": "auto",
      "alter_id": 0,
      "global_padding": false,
      "authenticated_length": true,
      "multiplex": {
        "enabled": false,
        "protocol": "smux",
        "max_streams": 32
      },
      "transport": {
        "type": "ws",
        "path": "/files",
        "headers": {
          "Host": "2.lowh.net"
        },
        "max_early_data": 0,
        "early_data_header_name": "Sec-WebSocket-Protocol"
      },
      "domain_strategy": "ipv4_only"
    },
    {
      "tag": "5.lowh.net",
      "type": "vmess",
      "server": "104.21.8.121",
      "server_port": 80,
      "uuid": "62ec1230-1dae-11ee-9756-1577c1651679",
      "security": "auto",
      "alter_id": 0,
      "global_padding": false,
      "authenticated_length": true,
      "multiplex": {
        "enabled": false,
        "protocol": "smux",
        "max_streams": 32
      },
      "transport": {
        "type": "ws",
        "path": "/files",
        "headers": {
          "Host": "5.lowh.net"
        },
        "max_early_data": 0,
        "early_data_header_name": "Sec-WebSocket-Protocol"
      },
      "domain_strategy": "ipv4_only"
    },
    {
      "tag": "6.lowh.net",
      "type": "vmess",
      "server": "104.21.8.121",
      "server_port": 80,
      "uuid": "b29a5180-1dae-11ee-ab60-1577c1651679",
      "security": "auto",
      "alter_id": 0,
      "global_padding": false,
      "authenticated_length": true,
      "multiplex": {
        "enabled": false,
        "protocol": "smux",
        "max_streams": 32
      },
      "transport": {
        "type": "ws",
        "path": "/files",
        "headers": {
          "Host": "6.lowh.net"
        },
        "max_early_data": 0,
        "early_data_header_name": "Sec-WebSocket-Protocol"
      },
      "domain_strategy": "ipv4_only"
    },
    {
      "tag": "sg-contabo2.1server.co",
      "type": "vmess",
      "server": "104.21.8.121",
      "server_port": 80,
      "uuid": "b895f440-1daf-11ee-be88-1577c1651679",
      "security": "auto",
      "alter_id": 0,
      "global_padding": false,
      "authenticated_length": true,
      "multiplex": {
        "enabled": false,
        "protocol": "smux",
        "max_streams": 32
      },
      "transport": {
        "type": "ws",
        "path": "/files",
        "headers": {
          "Host": "sg-contabo2.1server.co"
        },
        "max_early_data": 0,
        "early_data_header_name": "Sec-WebSocket-Protocol"
      },
      "domain_strategy": "ipv4_only"
    },
    {
      "tag": "sg-contabo3.1server.co",
      "type": "vmess",
      "server": "104.21.8.121",
      "server_port": 80,
      "uuid": "ccd2be00-1daf-11ee-a0f5-1577c1651679",
      "security": "auto",
      "alter_id": 0,
      "global_padding": false,
      "authenticated_length": true,
      "multiplex": {
        "enabled": false,
        "protocol": "smux",
        "max_streams": 32
      },
      "transport": {
        "type": "ws",
        "path": "/files",
        "headers": {
          "Host": "sg-contabo3.1server.co"
        },
        "max_early_data": 0,
        "early_data_header_name": "Sec-WebSocket-Protocol"
      },
      "domain_strategy": "ipv4_only"
    },
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "block",
      "tag": "block"
    },
    {
      "type": "dns",
      "tag": "dns-out"
    }
  ],
  "route": {
    "auto_detect_interface": true,
    "final": "Internet",
    "geoip": {
      "download_url": "https://github.com/malikshi/sing-box-geo/releases/latest/download/geoip.db",
      "download_detour": "Best Latency"
    },
    "geosite": {
      "download_url": "https://github.com/malikshi/v2ray-rules-dat/releases/latest/download/geosite.db",
      "download_detour": "Best Latency"
    },
    "rules": [
      {
        "outbound": "dns-out",
        "port": [
          53
        ]
      }
    ]
  }
}