Total Pageviews

Monday 25 February 2013

shadowsocks-go



shadowsocks-go 是一个轻量级的隧道代理,用来穿透防火墙。它是 shadowsocks 的一个分支,两者协议兼容(都升级到最新版本)。
注意 shadowsocks-go 必须有独立的服务器才可使用

安装

google code 上可以下载编译好的可执行文件。
如果你安装了 Go,也可以从源码安装:
# 服务器
go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-server
# 客户端
go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-local

使用方法

客户端和服务器端默认在当前目录下寻找 config.json 配置文件。可以使用 -c 选项指定其他配置文件。
配置文件使用 json,跟 shadowsocks-nodejs 的配置兼容。您可下载配置样例 config.json, 然后修改以下选项:
server          服务器 ip 或者 host name
server_port     服务器监听的端口
local_port      客户端本地 socks5 代理端口
method          加密方法,默认 null,可以指定为 rc4
password        用于加密传输的密码
timeout         服务器端选项,以秒为单位
服务器上执行 shadowsocks-server & 即可。Linux 服务器也可以使用提供的启动脚本,注意修改脚本开头的路径。
Linux/OS X 客户机端执行 shadowsocks-local &,修改浏览器代理为 SOCKS5 代理。Windows/OS X 客户端可以直接双击执行。
SOCKS5 127.0.0.1:local_port

命令行选项

命令行选项比配置文件中的选项有更高优先级。使用 -h 选项来查看所有支持的选项。
shadowsocks-local -s server_name -p server_port -l local_port -k password -m rc4 -c config.json
shadowsocks-server -p server_port -k password -t timeout -m rc4 -c config.json
-d 选项可以开启 debug 信息。

客户端指定多个服务器

server_password    指定多个服务器和密码,服务器形式为 host:port
配置文件例子 client-multi-server.json。 如果有 server_password 选项,客户端会忽略 server_port, serverpassword 选项。
多个服务器按顺序选取,如果某个服务器无法建立连接,会自动尝试下一个服务器。客户端不会检查密码错误导致的连接问题,这样可以让用户发现配置错误。

服务器端多用户支持

服务器支持使用不同密码的多个用户,每个用户使用一个独立的端口。在服务器上使用下列选项来支持多用户:
port_password   指定要监听的端口和对应的密码
配置文件例子 server-multi-port.json。如果有 port_password,服务器会忽略 server_portpassword 选项。

在线更新密码

编辑用来启动服务器的配置文件,然后向服务器进程发 SIGHUP 信号即可。

OpenVZ 用户特别注意

请使用支持 vswap 的 OpenVZ 虚拟机,否则系统会错误的过多统计 shadowsocks-go 使用的内存。在支持 vswap OpenVZ 虚拟机上 shadowsocks-go 启动后占用约 3MB 内存。
如果无法使用 vswap 而且内存占用存在问题,请考虑使用 shadowsocks-libuv

from http://shadowsocks.github.com/shadowsocks-go/
 
shadowsocks-go在各个操作系统下的客户端:
https://code.google.com/p/shadowsocks-go/downloads/list
----------------------------------------------------------------------

shadowsocks-go

Current version: 0.6.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.

Install

Compiled client binaries are provided on google code. (Compiled with cgo disabled.)
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 recommend 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, or use "rc4"
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

Command line options

Command line options can override settings from configuration files. Use -h option to see all available options.
shadowsocks-local -s server_name -p server_port -l local_port -k password -m rc4 -c config.json
shadowsocks-server -p server_port -k password -t timeout -m rc4 -c config.json
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-libuv.

from https://github.com/shadowsocks/shadowsocks-go

----------------------------------------------------------------------------------------------
Shadowsocks is a high-performance cross-platform secured socks5 proxy. It will help you surf the internet privately and securely. 

Super fast

Bleeding edge techniques with Asynchronous I/O and Event-drievn programming.

Light weight

Low resource comsumption, suitable for low end boxes and embedded devices.

Clear protocol

No more than 1000 lines of codes for the core module, flexible to use different ecryption methods.

Cross platform

Avaliable on multiple platforms, including PC, MAC, Mobile (Android and iOS) and Routers (OpenWRT).

Open source

Open source implementions in python, node.js, golang, C#, and pure C.

Mature communitiy

Dozens of contributors working on this project, who are happy to provide support to our users.

下载地址:

Windows


GUI client
Download: x86
Maintained by @clowwindy
Notes:
  1. Only supports the classic encryption method.
  2. Requires .NET framework 2.0 or plus.

Command line client
Download: 32bit / 64bit
Manual: English / 中文
Maintained by @cyfdecyf




Mac OS X


Shadowsocks mode in GoAgentX
Download: GoAgentX-v1.3.12.dmg
Maintained by @ohdarling





Cross Platform


Python
Source: GitHub
Maintained by @clowwindy

Node.js
Source: GitHub
Maintained by @clowwindy

Golang
Source: GitHub
Binaries: Google Code
Maintained by @cyfdecyf





Android


Source: GitHub
Download: Nightly Build
App Store: Google Play
Source: GitHub
Maintained by @madeye
Notes:
  1. Global proxy function only works on rooted devices.
  2. For unrooted devices, users should enable the HTTP proxy mode and set up the system's proxy manually.





iOS


Source: GitHub
Download: deb
Source: GitHub
Maintained by @linusyang
Notes:
  1. Only for Jailbreak devices.
  2. To install it through Cydia, add http://yangapp.googlecode.com/svn to the source list.





OpenWRT


Source: GitHub
Download: ipk
Maintained by @haohaolee
Notes:
  1. Only for Atheros AR71xx/AR7240/AR913x/AR934x devices.
  2. You can request for more device support by posting issues on GitHub.


For Developers

libev A lightweight client using libev and written in pure c, which is used in Android, iOS and OpenWRT clients. Maintained by @madeye
Source: Github
libuv A lightweight server using libuv, designed for deploying services in low end boxes. Maintained by @dndx
Source: Github
Ruby A developing ruby implementation. Maintained by @clowwindy
Source: Github
Dotcloud A developing node.js implementation using websocket for PaaS. Maintained by @clowwindy
Source: Github

from http://www.shadowsocks.org/downloads