Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Enable multiuser support through a single port #1365

Open
miladrahimi opened this issue Nov 29, 2023 · 3 comments
Open

Feature Request: Enable multiuser support through a single port #1365

miladrahimi opened this issue Nov 29, 2023 · 3 comments

Comments

@miladrahimi
Copy link

miladrahimi commented Nov 29, 2023

Since Shadowsocks 2022 is a different protocol that many clients don't support, the standard Shadowsocks server should enable multiuser functionality through a single port. While Xray-core already has a similar feature, it's important for the official project to adopt this capability as well.

Xray-core configuration sample that support similar functionality:

{
    "inbounds": [
        {
            "port": 1234,
            "protocol": "shadowsocks",
            "settings": {
                "clients": [
                    {
                        "password": "example_user_1",
                        "method": "aes-128-gcm"
                    },
                    {
                        "password": "example_user_2",
                        "method": "aes-256-gcm"
                    },
                    {
                        "password": "example_user_3",
                        "method": "chacha20-poly1305"
                    }
                ],
                "network": "tcp,udp"
            }
        }
    ],
}
@zonyitoo
Copy link
Collaborator

zonyitoo commented Dec 1, 2023

Currently not interested in supporting multi-users for AEAD cipher protocols. Since the AEAD protocol itself doesn’t contain any user informations, so the only way to support multi-user is to “try” decrypt with all configured keys. Quite ugly and inefficient.

@TheOrdinaryWow
Copy link

TheOrdinaryWow commented Sep 28, 2024

Any update on this plz? @zonyitoo I tried to serve same config like

let request_template = AddRequest {
    server_port: remote_config.server_port,
    password: "0".to_owned(),
    method: Some(remote_config.cipher.to_string()),
    no_delay: None,
    plugin: None,
    plugin_opts: None,
    plugin_mode: None,
    mode: None,
    users: None,
};

then to update users based on request_template, and apply the changes using manager_client.add().

It'll just destroy current process and create a new one, which is neither efficient nor elegant. Any suggestion?

@zonyitoo
Copy link
Collaborator

No update at all. Use AEAD-2022 with EIH to support multi-users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants