Skip to content

gRPC API: impossible to add Shadowsocks22 user #5766

Description

@kastov

Integrity requirements

  • I have read all the comments in the issue template and ensured that this issue meet the 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 provided the complete config and logs, rather than just providing the truncated parts based on my own judgment.
  • I searched issues and did not find any similar issues.
  • The problem can be successfully reproduced in the latest Release

Description

If the initial Xray configuration (used at startup) contains an empty clients array for a Shadowsocks 2022 inbound (2022-blake3-aes-256-gcm) — any attempt to add a user to that inbound via the gRPC API will result in the following error:

/xray.app.proxyman.command.HandlerService/AlterInbound UNKNOWN: app/proxyman/command: proxy is not a UserManager

The inbound can be listed via gRPC and confirmed to be present — however, adding users to it programmatically is not possible.

{
  "$type": "xray.app.proxyman.command.ListInboundsResponse",
  "inbounds": [
    {
      "$type": "xray.core.InboundHandlerConfig",
      "tag": "REMNAWAVE_API_INBOUND"
    },
    {
      "$type": "xray.core.InboundHandlerConfig",
      "tag": "Simple SS22"
    }
  ]
}

Reproduction Method

  1. Start Xray with the configuration (below), leaving the clients array intentionally empty. Don't forget to remove TLS protection from API before starting Xray.
  2. Using the gRPC API, attempt to add a user to this inbound. (proto: xray.proxy.shadowsocks_2022.Account)
  3. The response is: /xray.app.proxyman.command.HandlerService/AlterInbound UNKNOWN: app/proxyman/command: proxy is not a UserManager. The user will not be added to the inbound.

Client config

Not related

Server config

Details
{
  "log": {
    "loglevel": "info"
  },
  "routing": {
    "rules": [
      {
        "inboundTag": [
          "REMNAWAVE_API_INBOUND"
        ],
        "outboundTag": "REMNAWAVE_API"
      }
    ]
  },
  "inbounds": [
    {
      "tag": "REMNAWAVE_API_INBOUND",
      "port": 61000,
      "listen": "127.0.0.1",
      "protocol": "dokodemo-door",
      "settings": {
        "address": "127.0.0.1"
      },
      "streamSettings": {
        "security": "tls",
        "tlsSettings": {
          "alpn": [
            "h2"
          ],
          "serverName": "internal.remnawave.local",
          "disableSystemRoot": true,
          "rejectUnknownSni": true,
          "certificates": [
            {
              "certificate": [
                "-----BEGIN CERTIFICATE-----",
                "...omitted...",
                "-----END CERTIFICATE-----"
              ],
              "key": [
                "-----BEGIN PRIVATE KEY-----",
                 "...omitted...",
                "-----END PRIVATE KEY-----"
              ]
            },
            {
              "usage": "verify",
              "certificate": [
                "-----BEGIN CERTIFICATE-----",
                "...omitted...",
                "-----END CERTIFICATE-----"
              ]
            }
          ]
        }
      }
    },
    {
      "tag": "Simple SS22",
      "port": 1237,
      "protocol": "shadowsocks",
      "settings": {
        "method": "2022-blake3-aes-256-gcm",
        "clients": [],
        "network": "tcp,udp",
        "password": "UZP5LS5McIBplREbAnHWBu2KVY+8xsdV6zerIV5IqdU="
      },
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls",
          "quic"
        ]
      }
    }
  ],
  "outbounds": [
    {
      "tag": "DIRECT",
      "protocol": "freedom"
    },
    {
      "tag": "BLOCK",
      "protocol": "blackhole"
    },
    {
      "tag": "RW_TB_OUTBOUND_BLOCK",
      "protocol": "blackhole"
    }
  ],
  "stats": {},
  "api": {
    "services": [
      "HandlerService",
      "StatsService",
      "RoutingService"
    ],
    "tag": "REMNAWAVE_API"
  },
  "policy": {
    "levels": {
      "0": {
        "statsUserUplink": true,
        "statsUserDownlink": true,
        "statsUserOnline": true
      }
    },
    "system": {
      "statsInboundDownlink": true,
      "statsInboundUplink": true,
      "statsOutboundDownlink": true,
      "statsOutboundUplink": true
    }
  }
}
</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions