{
  "log": {
    "loglevel": "warning", 
    "access": "./access.log"
  },
 
  "api": {
    "services": [
      "HandlerService",
      "LoggerService",
      "StatsService"
    ],
    "tag": "api"
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 62789,
      "protocol": "dokodemo-door",
      "settings": {
        "address": "127.0.0.1"
      },
      "tag": "api"
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "policy": {
    "levels": {
      "0": {
        "statsUserUplink": true,
        "statsUserDownlink": true
      }
    },
    "system": {
      "statsInboundDownlink": true,
      "statsInboundUplink": true
    }
  },
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api",
        "type": "field"
      },

{
      "domain": [
        "geosite:category-ads-all",
        "geosite:category-porn",
        "geosite:category-ir",
        "geosite:cn"
      ],
       "outboundTag": "blocked",
       "type": "field"
    },

      {
        "ip": [
          "geoip:cn",
          "geoip:ir",
          "geoip:private"
        ],
        "outboundTag": "blocked",
        "type": "field"
      },
      {        
        "protocol": [
          "bittorrent"
        ],
        "outboundTag": "blocked",
        "type": "field"
      }
    ]
  },
  "stats": {}
}
