{
  "log": { "level": "warn", "timestamp": true },
  "dns": {
    "servers": [
      { "tag": "remote-dns", "address": "tcp://1.1.1.1", "detour": "ssh-out" },
      { "tag": "local-dns", "address": "local", "detour": "direct" }
    ],
    "rules": [
      { "rule_set": [ "ru-site" ], "server": "local-dns" }
    ],
    "final": "remote-dns"
  },
  "inbounds": [
    {
      "type": "tun",
      "tag": "tun-in",
      "address": [ "172.19.0.1/30" ],
      "auto_route": true,
      "strict_route": false
    }
  ],
  "outbounds": [
    {
      "type": "ssh",
      "tag": "ssh-out",
      "server": "76.13.149.115",
      "server_port": 22,
      "user": "phone",
      "password": "112f7cb5dbfa88b52ffcc901"
    },
    { "type": "direct", "tag": "direct" }
  ],
  "route": {
    "rules": [
      { "rule_set": [ "ru-site", "ru-ip" ], "outbound": "direct" },
      { "ip_is_private": true, "outbound": "direct" }
    ],
    "rule_set": [
      {
        "tag": "ru-site",
        "type": "remote",
        "format": "binary",
        "url": "https://phonecfg-76-13-149-115.nip.io:8444/geosite-ru.srs",
        "download_detour": "direct"
      },
      {
        "tag": "ru-ip",
        "type": "remote",
        "format": "binary",
        "url": "https://phonecfg-76-13-149-115.nip.io:8444/geoip-ru.srs",
        "download_detour": "direct"
      }
    ],
    "final": "ssh-out",
    "auto_detect_interface": true
  }
}
