Coder Social home page Coder Social logo

shadowsocks's Introduction

shadowsocks

PyPI version Build Status

A fast tunnel proxy that helps you bypass firewalls.

Features:

  • TCP & UDP support
  • User management API
  • TCP Fast Open
  • Workers and graceful restart
  • Destination IP blacklist

Server

Install

Debian / Ubuntu:

apt-get install python-pip
pip install git+https://github.com/shadowsocks/shadowsocks.git@master

CentOS:

yum install python-setuptools && easy_install pip
pip install git+https://github.com/shadowsocks/shadowsocks.git@master

For CentOS 7, if you need AEAD ciphers, you need install libsodium

dnf install libsodium python34-pip
pip3 install  git+https://github.com/shadowsocks/shadowsocks.git@master

Linux distributions with snap:

snap install shadowsocks

Windows:

See Install Shadowsocks Server on Windows.

Usage

ssserver -p 443 -k password -m aes-256-cfb

To run in the background:

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start

To stop:

sudo ssserver -d stop

To check the log:

sudo less /var/log/shadowsocks.log

Check all the options via -h. You can also use a [Configuration] file instead.

If you installed the snap package, you have to prefix the commands with shadowsocks., like this:

shadowsocks.ssserver -p 443 -k password -m aes-256-cfb

Usage with Config File

Create configuration file and run

To start:

ssserver -c /etc/shadowsocks.json

Documentation

You can find all the documentation in the Wiki.

License

Apache License

###############################################################################

源码编译安装

git clone https://ghproxy.com/[email protected]:BrentHuang/shadowsocks.git

注意:在 python 高版本上有报错,需要改源码,我已改好。

python3 setup.py build

sudo python3 setup.py install

client 配置文件:/etc/shadowsocks/shadowsocks.json,配置参考 config.json.example 文件,如下:

{ "server": "127.0.0.1", # 改为你的服务器地址 "server_port": 8388, # 改为你的服务器端口 "local_address": "127.0.0.1", "local_port": 1080, # 本地端口,一般不用变 "password": "mypassword", # 改为你的密码 "timeout": 600, "method": "aes-256-cfb" # 加密方式,一般不用变 }

启动 client:sudo sslocal -c /etc/shadowsocks/shadowsocks.json --log-file=/var/log/shadowsocks.log -d start

停止:sudo sslocal -d stop

help 信息:sslocal -h

安装 privoxy

sudo apt-get install -y privoxy

编辑配置文件

sudo cp /etc/privoxy/config /etc/privoxy/config.bak sudo vim /etc/privoxy/config

找到 listen-address 127.0.0.1:8118 行,取消注释

GFWList2Privoxy 安装配置

sudo pip3 install gfwlist2privoxy

获取在线 gfwlist 文件,并生成 actionfile 文件

cd /tmp
wget https://ghproxy.com/https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt
gfwlist2privoxy -i gfwlist.txt -f gfwlist.action -p 127.0.0.1:1080 -t socks5
sudo cp gfwlist.action /etc/privoxy/

在 /etc/privoxy/gfwlist.action 文件中添加需要通过 proxy 访问的域名(常用的已经在里面了,不需要改),

在 /etc/privoxy/config 文件中加上:actionsfile gfwlist.action。

重启 privoxy

sudo service privoxy restart

设置系统代理 Network Proxy

将系统代理设置为手动 Manual,http 代理和 https 代理 ip 均为 127.0.0.1,port 均为 8118

浏览器代理设置为:使用系统代理 Use system proxy settings。

shadowsocks's People

Contributors

brenthuang avatar clowwindy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.