Skip to content

tssujt/pyShadowsocks

 
 

Repository files navigation

DESC

This project implements the Shadowsocks protocol using python3.5 and asyncio library since the original project source code is unreadble and frustrated to extend.

Shadowsocks is a proxy program, that the client is listening socks5 protocol on local(socks5 connect/UDP association), forward encrypt socks5 data to remote proxy, and then the proxy forward the socket data to target host. It hides the SOCKS5 handshakes and traffic bytes from censor.

Shadowsocks is mainly used for bypassing Great Firewall of China, since the data is encrypt and sent over normal TCP/UDP, no handshake, no fingerprint, getting away from packet inspection, it's hard to block.

FEATURE

  • shadowsocks protocol implements TCP proxy without OTA feature, no UDP

TODO

  1. SOCKS5 user/password authentication
  2. SOCKS5 over SSL
  3. Remove the cryptography library, use openSSL with ctypes.
  4. Use Apple's cryto library for Mac OS X instead of openssl
  5. Filtering connections to local ip for security consideration
  6. Flow control
  7. Custom protocol
  8. Multi threading/process for multiple user/port

INSTALLATION

For Ubuntu 14.04

sudo apt-get install -y python-software-properties
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-cache show python3.5
sudo apt-get install -y python3.5 python3.5-dev
sudo apt-get install python3.5-venv
sudo apt-get install openssl

sudo pip3 install -e git+https://github.com/FTwOoO/pyShadowsocks.git@master#egg=pyshadowsocks

For Ubuntu 16.04

sudo apt-get install python3-pip openssl
sudo pip3 install pip --upgrade
sudo pip3 install setuptools
sudo pip3 install -e git+https://github.com/FTwOoO/pyShadowsocks.git@master#egg=pyshadowsocks

For Mac OSX

Mac OS has a deprecated openSSL and does not includes the header files, so you need to install openSSL library manually.

brew install openssl
sudo pip3 install pip --upgrade
sudo pip3 install setuptools
sudo pip3 install -U -e git+https://github.com/FTwOoO/pyShadowsocks.git@master#egg=pyshadowsocks

You can build openssl manually using the script

Run it!

For shadowsocks protocol

  • proxy server
ss shadowsocks --cipher_method aes-256-cfb --password 123456 remote --listen_port 8099 &
  • local server
ss shadowsocks --cipher_method aes-256-cfb --password 123456 local --remote_host 110.110.110.110 --remote_port 8099 &
  • Mac OSX GUI wrapper

    With GoAgentX, you can run local server and switch SOCKS proxies at the same time, making task easier.

  1. Download GoAgentX for Mac.

  2. Add a shell service config (to start local socks server) and then click the ON button GoAgentX setting for pyShadowsocks

About

Shadowsocks client/server written in python3 without third party dependencies

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 55.7%
  • JavaScript 44.3%