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

Is it possible to run sslocal as a plain-old SOCKS5 server? #818

Closed
flavorgold1 opened this issue Apr 26, 2022 · 5 comments
Closed

Is it possible to run sslocal as a plain-old SOCKS5 server? #818

flavorgold1 opened this issue Apr 26, 2022 · 5 comments

Comments

@flavorgold1
Copy link

If not, would it be a lot of work to enable such a feature?
I know that this isn't the purpose of this software, but, I think it sort of helps us make more "multipurpose" use of it.
I can't find other decent, well-supported SOCKS5 servers like this one.

@zonyitoo
Copy link
Collaborator

Set a ACL file to "bypass" all requests, then it will become a pure SOCKS5 server.

@flavorgold1
Copy link
Author

flavorgold1 commented Apr 27, 2022

config.json:

{
    "locals": [
        {
            "local_address":"::",
            "local_port":6000,
            "mode":"tcp_and_udp",
            "socks5_auth_config_path":"/path/to/auth.json"
        }
    ]
}

acl.json:

[bypass_all]

auth.json:

{
    "password": {
        "users": [
            {
                "user_name": "socks_user_id",
                "password": "socks_password"
            }
        ]
    }
}

Result of ./sslocal --config ./config.json --acl ./acl.json:

missing proxy servers, consider specifying it by --server-addr, --encrypt-method, --password command line option, or --server-url command line option, or configuration file, check more details in https://shadowsocks.org/en/config/quick-guide.html

What am I doing wrong here?
Sorry and Thank You.

@zonyitoo
Copy link
Collaborator

Just give a random server config, server, server_port, method, password

@flavorgold1
Copy link
Author

Just give a random server config, server, server_port, method, password

Wow. That worked. Do I have to care about whether this sslocal keeps trying to connect to that dummy shadowsocks server? I set it to 127.0.0.1 with some random port number. Or, does sslocal only try to establish a connection when it needs to?

@zonyitoo
Copy link
Collaborator

Yes, it will connect only when it needs to.

zonyitoo added a commit that referenced this issue May 15, 2022
If no server was configured, then sslocal will bypass all connections
and packets.
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

2 participants