Socket
Socket
Sign inDemoInstall

ss-n

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ss-n

A Node port of shadowsocks


Version published
Maintainers
1
Install size
67.6 kB
Created

Readme

Source

ss-n

This is a Node port of shadowsocks.

Feature

  • TCP & UDP support
  • Extendable cryptor

Method

  • aes-128-ctr
  • aes-192-ctr
  • aes-256-ctr
  • aes-128-cfb
  • aes-192-cfb
  • aes-256-cfb
  • camellia-128-cfb
  • camellia-192-cfb
  • camellia-256-cfb
  • bf-cfb
  • rc4
  • rc4-md5

Install

You need to firstly install Node environment. Node version need to be up to 8.0 and npm (node package manager) is integrated with Node installer. You could find information here.

Install from npm

# global install
$ npm i -g ss-n

Usage

Local

Usage: sslocal [options]

Options:
    -v, --version               output the version number
    -c, --config <path>         set custom config
    -a, --server <string>       set remote server address
    -p, --server_port <number>  set remote server port
    -s, --local <string>        set local server address
    -o, --local_port <number>   set local server port
    -k, --password <string>     set password
    -m, --method <string>       set method
    -t, --timeout <number>      set timeout
    -l, --log                   log output for debug
    -h, --help                  output usage information

All set options will automatically overwrite the internal configuration file and save down, that means all settings will be saved and next time you won't set them again.

To start:

$ sslocal

To start with settings:

# you could just offer some of them
$ sslocal -a 123.123.123.123 -p 8000 -s localhost -o 1080 -k test -m aes-256-cfb -t 600

To start with logs:

$ sslocal -l

To start with configuration:

# offer absolute path. ignore settings if use -c
$ sslocal -c /usr/local/ss-n/lib/local/config.json

Configuration is like below, and all supported keys are listed.

{
    "server": "127.0.0.1",
    "server_port": "8000",
    "local": "localhost",
    "local_port": "1080",
    "password": "test",
    "method": "aes-256-cfb",
    "timeout": "600"
}
settingvalueremark
serverrequiredremote server address
server_portrequiredremote server port
localoptionallocal server address, default: localhost
local_portoptionallocal server port, default: 1080
passwordoptionalfor encryptiong, default: test
methodoptionalencrpytion method, default: aes-256-cfb
timeoutoptionalserver timeout in second, default: 600

Server

Usage: ssserver [options]

Options:
    -v, --version               output the version number
    -c, --config <path>         set custom config
    -a, --server <string>       set remote server address
    -p, --server_port <number>  set remote server port
    -k, --password <string>     set password
    -m, --method <string>       set method
    -t, --timeout <number>      set timeout
    -l, --log                   log output for debug
    -h, --help                  output usage information

Same as sslocal. All set options will automatically overwrite the internal configuration file and save down.

To start:

$ ssserver

To start with settings:

# you could just offer some of them
$ ssserver -a 123.123.123.123 -p 8000 -k test -m aes-256-cfb -t 600

To start with logs:

$ ssserver -l

To start with configuration:

# offer absolute path. ignore settings if use -c
$ ssserver -c /usr/local/ss-n/lib/server/config.json

Global configuration is like:

{
    "server": "127.0.0.1",
    "server_port": "8000",
    "password": "test",
    "method": "aes-256-cfb",
    "timeout": "600"
}
settingvalueremark
serveroptionalremote server address, set automatically if missing
server_portrequiredremote server port
passwordoptionalfor encryptiong, default: test
methodoptionalencrpytion method, default: aes-256-cfb
timeoutoptionalserver timeout in second, default: 600

Besides, you can set multiple servers for different users by "servers", like below. "servers" will be priorly accepted if both global configuration and "servers" exist.

{
    // global configuration
    "server": "123.123.123.123",
    "server_port": "8000",
    "password": "origin",
    "method": "aes-256-cfb",
    "timeout": "600",
    // "servers" setting
    "servers": [
        {
            // "server" will be the same as global configuration
            "server_port": "8000",
            "password": "test",
            "method": "aes-256-cfb",
            "timeout": "600"
        },
        {
            "server": "123.123.123.100",
            "server_port": "8001",
            // "password", "method" and "timeout" will be the same
            // as global configuration
        }
    ]
}
settingvalueremark
servers.serveroptionalsame as global server if missing, or set automatically if no global server
servers.server_portrequiredremote server port
servers.passwordoptionalsame as global password if missing
servers.methodoptionalsame as global method if missing
servers.timeoutoptionalsame as global timeout if missing

About AEAD Support

Currently AEAD won't be supported, because it might be unnecessary. When encountering unmatched ip types, servers will refuse after random timeout, against active port scanning.

Keywords

FAQs

Last updated on 19 Oct 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc