{
  "log": {
    "level": "info"
  },
  "dns": {
    "servers": [
      {
        "type": "local",
        "tag": "default"
      }
    ]
  },
  "inbounds": [],
  "outbounds": [
    {
      "type": "direct",
      "tag": "direct-out"
    }
  ],
  "route": {
    "rules": [
      {
        "protocol": "dns",
        "action": "hijack-dns"
      }
    ],
    "final": "direct-out"
  },
  "services": [
    {
      "type": "manager",
      "tag": "my-manager",
      "database": {
        "driver": "sqlite",
        "dsn": "file:manager.db?_pragma=foreign_keys(on)&_pragma=journal_mode(wal)&_pragma=busy_timeout(5000)" // also supported Postgresql
      }
    },
    {
      "type": "manager-api",
      "tag": "my-manager-api",
      "api_type": "server",
      "protocol_type": "http",
      "listen": "0.0.0.0",
      "listen_port": 8080,
      "manager": "my-manager",
      "api_key": "change-me-secret",
      "cors": {
        "allowed_origins": ["*"],
        "max_age": 600
      },
      // Enable TLS for production deployments:
      // "tls": { // https://sing-box.sagernet.org/configuration/shared/tls/#inbound
      //   "enabled": true,
      //   "server_name": "manager.example.com",
      //   "certificate_path": "fullchain.pem",
      //   "key_path": "privkey.pem"
      // }
    },
    {
      "type": "node-manager-api",
      "tag": "my-node-manager-api",
      "api_type": "server",
      "listen": "0.0.0.0",
      "listen_port": 7000,
      "manager": "my-manager",
      "api_key": "change-me-secret",
      // Enable TLS for production deployments (the node connects via gRPC over h2):
      // "tls": { // https://sing-box.sagernet.org/configuration/shared/tls/#inbound
      //   "enabled": true,
      //   "server_name": "example.com",
      //   "alpn": "h2", // h3 for QUIC
      //   "certificate_path": "fullchain.pem",
      //   "key_path": "privkey.pem"
      // }
    },
    {
      "type": "admin-panel",
      "tag": "admin",
      "listen": "0.0.0.0",
      "listen_port": 8081,
      // Enable TLS for production deployments:
      // "tls": { // https://sing-box.sagernet.org/configuration/shared/tls/#inbound
      //   "enabled": true,
      //   "server_name": "panel.example.com",
      //   "certificate_path": "fullchain.pem",
      //   "key_path": "privkey.pem"
      // }
    }
  ]
}
