• This repository has been archived on 09/Apr/2020
  • Stars
    star
    6,620
  • Rank 5,692 (Top 0.2 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 11 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

go port of shadowsocks (Deprecated)

Deprecated

Use https://github.com/shadowsocks/go-shadowsocks2 instead.

shadowsocks-go

Current version: 1.2.2 Build Status

shadowsocks-go is a lightweight tunnel proxy which can help you get through firewalls. It is a port of shadowsocks.

The protocol is compatible with the origin shadowsocks (if both have been upgraded to the latest version).

Note server_password option syntax changed in 0.6.2, the client now connects to servers in the order specified in the config.

Please develop on the latest develop branch if you want to send pull request.

Install

Download precompiled binarys from the release page. (All compiled with cgo disabled, except the mac version.)

You can also install from source (assume you have go installed):

# on server
go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-server
# on client
go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-local

It's recommended to disable cgo when compiling shadowsocks-go. This will prevent the go runtime from creating too many threads for dns lookup.

Usage

Both the server and client program will look for config.json in the current directory. You can use -c option to specify another configuration file.

Configuration file is in json format and has the same syntax with shadowsocks-nodejs. You can download the sample config.json, change the following values:

server          your server ip or hostname
server_port     server port
local_port      local socks5 proxy port
method          encryption method, null by default (table), the following methods are supported:
                    aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, cast5-cfb, des-cfb, rc4-md5, rc4-md5-6, chacha20, salsa20, rc4, table
password        a password used to encrypt transfer
timeout         server option, in seconds

Run shadowsocks-server on your server. To run it in the background, run shadowsocks-server > log &.

On client, run shadowsocks-local. Change proxy settings of your browser to

SOCKS5 127.0.0.1:local_port

About encryption methods

AES is recommended for shadowsocks-go. Intel AES Instruction Set will be used if available and can make encryption/decryption very fast. To be more specific, aes-128-cfb is recommended as it is faster and secure enough.

rc4 and table encryption methods are deprecated because they are not secure.

One Time Auth

OTA function is deprecated because it is reported to have potential security risk.

Command line options

Command line options can override settings from configuration files. Use -h option to see all available options.

shadowsocks-local -s server_address -p server_port -k password
    -m aes-128-cfb -c config.json
    -b local_address -l local_port
shadowsocks-server -p server_port -k password
    -m aes-128-cfb -c config.json
    -t timeout

Use -d option to enable debug message.

Use multiple servers on client

server_password    specify multiple server and password, server should be in the form of host:port

Here's a sample configuration client-multi-server.json. Given server_password, client program will ignore server_port, server and password options.

Servers are chosen in the order specified in the config. If a server can't be connected (connection failure), the client will try the next one. (Client will retry failed server with some probability to discover server recovery.)

Multiple users with different passwords on server

The server can support users with different passwords. Each user will be served by a unique port. Use the following options on the server for such setup:

port_password   specify multiple ports and passwords to support multiple users

Here's a sample configuration server-multi-port.json. Given port_password, server program will ignore server_port and password options.

Update port password for a running server

Edit the config file used to start the server, then send SIGHUP to the server process.

Note to OpenVZ users

Use OpenVZ VM that supports vswap. Otherwise, the OS will incorrectly account much more memory than actually used. shadowsocks-go on OpenVZ VM with vswap takes about 3MB memory after startup. (Refer to this issue for more details.)

If vswap is not an option and memory usage is a problem for you, try shadowsocks-libev.

More Repositories

1

shadowsocks-windows

A C# port of shadowsocks
C#
57,941
star
2

shadowsocks-android

A shadowsocks client for Android
Kotlin
34,644
star
3

shadowsocks

Python
33,505
star
4

ShadowsocksX-NG

Next Generation of ShadowsocksX
Swift
32,168
star
5

shadowsocks-iOS

Removed according to regulations.
Objective-C
8,195
star
6

shadowsocks-qt5

A cross-platform shadowsocks GUI client
C++
7,952
star
7

shadowsocks-rust

A Rust port of shadowsocks
Rust
7,758
star
8

shadowsocks-manager

A shadowsocks manager tool for multi user and traffic control.
JavaScript
4,106
star
9

ChinaDNS

Protect yourself against DNS poisoning in China.
C
3,565
star
10

openwrt-shadowsocks

Shadowsocks-libev for OpenWrt/LEDE
Makefile
3,227
star
11

v2ray-plugin

A SIP003 plugin based on v2ray
Go
2,611
star
12

simple-obfs

A simple obfuscating tool (Deprecated)
C
2,344
star
13

shadowsocks-gui

Shadowsocks GUI client
CoffeeScript
2,005
star
14

libQtShadowsocks

A lightweight and ultra-fast shadowsocks library written in C++14 with Qt framework
C++
1,492
star
15

shadowsocks-nodejs

CoffeeScript
1,244
star
16

luci-app-shadowsocks

OpenWrt/LEDE LuCI for Shadowsocks-libev
Lua
1,133
star
17

shadowsocks-org

www.shadowsocks.org
HTML
823
star
18

ChinaDNS-Python

Protect yourself against DNS poisoning in China.
Python
766
star
19

shadowsocks-chromeapp

Chrome client for shadowsocks
CoffeeScript
693
star
20

kcptun-android

kcptun for Android.
Shell
564
star
21

simple-obfs-android

A simple obfuscating tool for Android
C
433
star
22

v2ray-plugin-android

A SIP003 V2ray plugin on Android
Kotlin
425
star
23

crypto2

The fastest cryptographic library in the galaxy
Rust
344
star
24

ShadowDNS

A DNS forwarder using Shadowsocks as the server
Python
333
star
25

papers

List of papers related to shadowsocks
210
star
26

shadowsocks-dotcloud

a port of shadowsocks via websockets protocol, able to tunnel through HTTP proxy
CoffeeScript
200
star
27

shadowsocks-hub

A web app managing shadowsocks users, servers, nodes, products, accounts, and traffic. Suitable for internal use by companies, organizations, and friends.
JavaScript
130
star
28

qtun

Yet another SIP003 plugin based on IETF-QUIC
Rust
115
star
29

shadow-shop

Building highly customizable e-commerce websites selling shadowsocks services, using Wordpress and WooCommerce
PHP
104
star
30

tun2socks-iOS

tun2socks as a library for iOS apps
94
star
31

Shadowsocks-Net

✈ A light-weight, cross-platform, extensible Shadowsocks developed in C# (.NET Core).
C#
89
star
32

shadowsocks-restful-api

Secure, reliable, standard restful api for managing shadowsocks-libev
JavaScript
79
star
33

stackscript

Shell
72
star
34

libsscrypto

Build libsscrypto.dll for shadowsocks-windows.
C
59
star
35

iptables

iptables is the userspace command line program used to configure the Linux 2.4.x and later packet filtering ruleset. It is targeted towards system administrators.
C
54
star
36

openwrt-feeds

OpenWrt/LEDE feeds
Makefile
52
star
37

shadowsocks-crypto

Shadowsocks Crypto
Rust
39
star
38

libev

A fork of libev
Shell
34
star
39

sysproxy

System Proxy Agent for Shadowsocks Windows
C
30
star
40

shadowsocks-hub-api

A set of open and standard restful APIs for managing shadowsocks users, servers, nodes, products, accounts, and traffic.
JavaScript
25
star
41

openssl-android

A fork of OpenSSL for shadowsocks-android
C
25
star
42

libancillary

sharing eventfd's across unrelated processes with libancillary
C
22
star
43

tun2socks

Rust
22
star
44

android-ndk-go

Circle CI Android image with NDK and golang + rust, for building golang and/or rust for NDK.
Dockerfile
18
star
45

libudns

A fork of libudns
C
11
star
46

overture-android

A wrapper of overture for shadowsocks-android
Shell
8
star
47

tls

TLS version 1.3
Rust
6
star
48

iana-ip-db

IANA IP Number Resources
Rust
3
star