All Projects → shadowsocks → go-shadowsocks2

shadowsocks / go-shadowsocks2

Licence: Apache-2.0 License
Modern Shadowsocks in Go

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to go-shadowsocks2

ss-v2ray-docker
Deprecated: please use https://hub.docker.com/r/mazy/ss-xray
Stars: ✭ 28 (-99.19%)
Mutual labels:  shadowsocks
shadowsocks-perl
An asynchronous, non-blocking shadowsocks client and server written in Perl.
Stars: ✭ 37 (-98.93%)
Mutual labels:  shadowsocks
potatoStream
Shadowsocks like Proxy,Written by nodejs
Stars: ✭ 22 (-99.37%)
Mutual labels:  shadowsocks
docker-ss-tproxy
ss-redir 全局透明代理 (REDIRECT + TPROXY)
Stars: ✭ 35 (-98.99%)
Mutual labels:  shadowsocks
shadowsocks erlite3
Shadowsocks for EdgeRouter Lite3
Stars: ✭ 22 (-99.37%)
Mutual labels:  shadowsocks
gost
GO Simple Tunnel - a simple tunnel written in golang
Stars: ✭ 154 (-95.56%)
Mutual labels:  shadowsocks
shadowsocks-java
A Java port of shadowsocks
Stars: ✭ 31 (-99.11%)
Mutual labels:  shadowsocks
YAOF
OpenWrt for Nanopi R2C/R2S/R4S/X86
Stars: ✭ 1,442 (-58.43%)
Mutual labels:  shadowsocks
iosvpn.github.io
iPhone和iOS 翻墙梯子VPN推荐,2022中国苹果手机iPhone翻墙软件和科学上网避坑指南,稳定梯子推荐。
Stars: ✭ 72 (-97.92%)
Mutual labels:  shadowsocks
Shadowsocks-manager
shadowsocks多用户管理,可视化管理,轻量级,一键安装shadowsocks和ssadmin,控制端口流量/速度,查看端口状态,修改ss配置
Stars: ✭ 52 (-98.5%)
Mutual labels:  shadowsocks
centos7-shadowsock
No description or website provided.
Stars: ✭ 19 (-99.45%)
Mutual labels:  shadowsocks
GeoIP2-CN
小巧精悍、准确、实用 GeoIP2 数据库
Stars: ✭ 3,965 (+14.3%)
Mutual labels:  shadowsocks
SSServerDeviceLimit
可以让Shadowsocks服务器限制某个端口的设备连接数,防止有人恶意分享ss账号
Stars: ✭ 18 (-99.48%)
Mutual labels:  shadowsocks
Alfred ShadowsocksController
ShadowsocksX controller for Alfred
Stars: ✭ 70 (-97.98%)
Mutual labels:  shadowsocks
ssmgr-install
shadowsocks-manager 前端+后端+魔改BBR一键部署脚本
Stars: ✭ 29 (-99.16%)
Mutual labels:  shadowsocks
shadowsocks-libev
Bug-fix-only libev port of shadowsocks. Future development moved to shadowsocks-rust
Stars: ✭ 14,930 (+330.38%)
Mutual labels:  shadowsocks
mieru
見える是一款 socks5 网络代理(科学上网)工具。Mieru is a socks5 proxy to bypass censorship.
Stars: ✭ 63 (-98.18%)
Mutual labels:  shadowsocks
ssr-install-shellscript
one click to install ssr/ss 一键ss、ssr安装脚本
Stars: ✭ 33 (-99.05%)
Mutual labels:  shadowsocks
gost
GO Simple Tunnel - a simple tunnel written in golang
Stars: ✭ 8,395 (+142%)
Mutual labels:  shadowsocks
fast-shadowsocks
在shadowsocks-go基础上加快传输层,配置和使用方法不变。(注意client端和server端要配合使用,不兼容以前的shadowsocks-go)。下载:https://github.com/dearplain/fast-shadowsocks/releases
Stars: ✭ 26 (-99.25%)
Mutual labels:  shadowsocks

go-shadowsocks2

A fresh implementation of Shadowsocks in Go.

GoDoc at https://godoc.org/github.com/shadowsocks/go-shadowsocks2/

Build and test

Features

  • SOCKS5 proxy with UDP Associate
  • Support for Netfilter TCP redirect on Linux (IPv6 should work but not tested)
  • Support for Packet Filter TCP redirect on MacOS/Darwin (IPv4 only)
  • UDP tunneling (e.g. relay DNS packets)
  • TCP tunneling (e.g. benchmark with iperf3)
  • SIP003 plugins
  • Replay attack mitigation

Install

Pre-built binaries for common platforms are available at https://github.com/shadowsocks/go-shadowsocks2/releases

Install from source

go get -u -v github.com/shadowsocks/go-shadowsocks2

Basic Usage

Server

Start a server listening on port 8488 using AEAD_CHACHA20_POLY1305 AEAD cipher with password your-password.

go-shadowsocks2 -s 'ss://AEAD_CHACHA20_POLY1305:your-password@:8488' -verbose

Client

Start a client connecting to the above server. The client listens on port 1080 for incoming SOCKS5 connections, and tunnels both UDP and TCP on port 8053 and port 8054 to 8.8.8.8:53 and 8.8.4.4:53 respectively.

go-shadowsocks2 -c 'ss://AEAD_CHACHA20_POLY1305:your-password@[server_address]:8488' \
    -verbose -socks :1080 -u -udptun :8053=8.8.8.8:53,:8054=8.8.4.4:53 \
                             -tcptun :8053=8.8.8.8:53,:8054=8.8.4.4:53

Replace [server_address] with the server's public address.

Advanced Usage

Netfilter TCP redirect on Linux

The client offers -redir and -redir6 (for IPv6) options to handle TCP connections redirected by Netfilter on Linux. The feature works similar to ss-redir from shadowsocks-libev.

Start a client listening on port 1082 for redirected TCP connections and port 1083 for redirected TCP IPv6 connections.

go-shadowsocks2 -c 'ss://AEAD_CHACHA20_POLY1305:your-password@[server_address]:8488' -redir :1082 -redir6 :1083

TCP tunneling

The client offers -tcptun [local_addr]:[local_port]=[remote_addr]:[remote_port] option to tunnel TCP. For example it can be used to proxy iperf3 for benchmarking.

Start iperf3 on the same machine with the server.

iperf3 -s

By default iperf3 listens on port 5201.

Start a client on the same machine with the server. The client listens on port 1090 for incoming connections and tunnels to localhost:5201 where iperf3 is listening.

go-shadowsocks2 -c 'ss://AEAD_CHACHA20_POLY1305:your-password@[server_address]:8488' -tcptun :1090=localhost:5201

Start iperf3 client to connect to the tunneld port instead

iperf3 -c localhost -p 1090

SIP003 Plugins (Experimental)

Both client and server support SIP003 plugins. Use -plugin and -plugin-opts parameters to enable.

Client:

go-shadowsocks2 -c 'ss://AEAD_CHACHA20_POLY1305:your-password@[server_address]:8488' \
    -verbose -socks :1080 -u -plugin v2ray

Server:

go-shadowsocks2 -s 'ss://AEAD_CHACHA20_POLY1305:your-password@:8488' -verbose \
    -plugin v2ray -plugin-opts "server"

Note:

It will look for the plugin in the current directory first, then $PATH.

UDP connections will not be affected by SIP003.

Replay Attack Mitigation

By default a Bloom filter is deployed to defend against replay attacks. Use the following environment variables to fine-tune the mechanism:

  • SHADOWSOCKS_SF_CAPACITY: Number of recent connections to track. Default 1e6 (one million). Setting it to 0 disables the feature.
  • SHADOWSOCKS_SF_FPR: False positive rate of the Bloom filter. Default 1e-6 (0.0001%). This should be enough for most cases.
  • SHADOWSOCKS_SF_SLOT: The Bloom filter is divided into a number (default 10) of slots. When the Bloom filter is full, the oldest slot will be cleared for recycling. In general you should not change this number unless you understand what you are doing.
SHADOWSOCKS_SF_CAPACITY=1e6 SHADOWSOCKS_SF_FPR=1e-6 SHADOWSOCKS_SF_SLOT=10 go-shadowsocks2 ...

Design Principles

The code base strives to

  • be idiomatic Go and well organized;
  • use fewer external dependences as reasonably possible;
  • only include proven modern ciphers;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].