shadowsocks / shadowsocks/shadowsocks-rust

[FR] Server instances per local port

Open
#1,095 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
10.9k
Forks
1.5k
Avg merge
4d 15h
Merged PRs (30d)
5

Description

So, multiple server is a great addition to shadowsocks, however my issue is that it essentially works as load balancer rather than actual being separate servers. It would be great if we could define for each server a local listener instance with unique local port. For example, Server1-3 declared in the config file gets requests from 127.0.0.1:1080 but Servers 3-5 will be getting requests from 127.0.0.1:1081. This mean sslocal can open multiple listen ports and two or more instances no longer required for this to work.

So essentially:

{
    "servers": [
        {
            "address": ".ip.ip.ip.ip",
            "port": 8388,
            "password": "hello-world",
            "method": "aes-256-gcm",
            "timeout": 7200,
            "local_port": 1081,
            "local_address": "127.0.0.1"
        },
        {
            "address": "ip.ip.ip.ip",
            "port": 8389,
            "password": "hello-kitty",
            "method": "chacha20-ietf-poly1305",
            "local_port": 1082,
            "local_address": "127.0.0.1"
        },
    ],
    #Global listener for all servers who dont have it defined per server
    "local_port": 8888,
    "local_address": "127.0.0.1"
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining sslocal's configuration and listener setup, using the per-server and global local_port/local_address example as the desired behavior. Done means servers can be grouped by distinct local listeners, while servers without per-server settings use the global listener, without requiring multiple sslocal instances.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.