Skip to content

liguobao/blinksocks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blinksocks

version downloads license dependencies devDependencies

Travis Coverage %e2%9d%a4

Yet another socks5 proxy, designed for speed ⚡. Inspired by Shadowsocks.

Across the Great Wall we can reach every corner in the world.

Installation

You can get pre-compiled library(including executable) of blinksocks from yarn or npm. Both approach requires your system have had Node.js installed.

-> via yarn

If you know yarn, this way is recommended:

$ yarn global add blinksocks

-> via npm

$ npm install -g blinksocks

Usage

Once installed, you can access blinksocks from command line directly:

$ blinksocks --help

Options

The options are quite simple at present:


  Usage: blinksocks [options] [...]

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -c, --config <file>  a json file for configuration
    --ciphers            show all supported ciphers on the current platform

Configuration

To start a server/client, you must specify a configuration json file(config.json for example) via --config or -c.

For Client, the file looks like:

{
  "host": "localhost",
  "port": 1080,
  "server_host": "example.com",
  "server_port": 7777,
  "password": "my secret password",
  "cipher": "aes-256-cfb",
  "use_iv": true,
  "log_level": "error"
}

For Server, the file looks like(without server_host and server_port):

{
  "host": "0.0.0.0",
  "port": 7777,
  "password": "my secret password",
  "cipher": "aes-256-cfb",
  "use_iv": true,
  "log_level": "error"
}
  • host: Typically localhost.
  • port: Typically 1080.
  • server_host: Typically 0.0.0.0.
  • server_port: Any available number.
  • password: For data encryption, please keep it secret!
  • cipher: Encryption method. You can enable non-encryption mode by set it to empty string.
  • use_iv: Whether encrypt/decrypt with initialization vector or not.
  • log_level: should take a value from Logging Level of Log4js.Level. The levels are case-insensitive and cumulative.

Examples

Once prepared the config.json, you can start a service by a simple command:

$ blinksocks -c config.json

Compile

For production use, we are running our code under lib not src, so compilation is necessary.

Compilation of blinksocks is super easy:

$ npm run compile

This will compile src to lib.

Test

Any application who supports socks5 protocol(RFC 1928) can be used for testing.

For example:

$ curl --socks5-hostname localhost:1080 https://www.google.com

For Firefox/Google Chrome and more...

A common usage of blinksocks is used it on browsers, so I give an advise here.

For Google Chrome, SwitchyOmega extension is a great approach to use socks5 service.

For FireFox, you can configure proxy at Settings - Advanced - Network - Proxy.

Documentation

If you are interesting in Principle or Architecture of blinksocks, please

check this out: docs.

Roadmap

Done:

  • non-encryption mode for debugging and non-security scenarios

Next major version(v2.0.0):

  • streaming data send/receive
  • encrypt/decrypt with initialization vector
  • DNS cache
  • UDP relay
  • more command line options

Further versions:

  • multiple servers
  • ip ban
  • add daemon
  • more tests
  • more docs
  • more cipher support
  • ...

Contributors

Micooz(Owner), micooz@hotmail.com

Waiting for more contributors...

License

Apache License 2.0

About

Yet another Socks5 proxy, designed for speed ⚡. Inspired by Shadowsocks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%