Giter Club home page Giter Club logo

shadowsocksr's Introduction

shadowsocks

PyPI version Build Status Coverage Status

A fast tunnel proxy that helps you bypass firewalls.

Server

Install

Debian / Ubuntu:

apt-get install python-pip
pip install shadowsocks

CentOS:

yum install python-setuptools && easy_install pip
pip install shadowsocks

Windows:

See Install 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.

Client

Use GUI clients on your local PC/phones. Check the README of your client for more information.

Documentation

You can find all the documentation in the Wiki.

License

Copyright 2015 clowwindy

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Bugs and Issues

shadowsocksr's People

Contributors

breakwa11 avatar clowwindy avatar dreampuf avatar est avatar everplays avatar fa08c avatar felixonmars avatar jackyyf avatar jlund avatar kimw avatar lazybios avatar mengskysama avatar mitnk avatar nekolab avatar peterfyj avatar phuslu avatar shell909090 avatar sky-chen avatar sybblow avatar v3aqb avatar wb14123 avatar xe0n0 avatar zh-liang-cn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shadowsocksr's Issues

I can't use -O to choose which protocol to use in UBUNTU

When I type in
root@ip-172-31-16-171:~/shadowsocksr/shadowsocks# python server.py -p 443 -k password -m aes-128-cfb -O auth_aes128_md5 -o tls1.2_ticket_auth_compatible

An error occur: option -O not recognized

I just clone It from this Git Today!

SSR各种客户端下载,快速稳定的机场

一、Just My Socks 介绍

Just My Socks官网

Just My Socks 是搬瓦工官方出品的 ss 加速器,品质有保障!!!最低价格 $2.88 一个月,每月流量 100GB,提供多个域名供连接,并且保证可用,IP被封自动更换IP,不需要任何操作,也不需要其它费用。全部都是美西 CN2 GIA 线路,速度很快很稳定。现在 Just My Socks 已支持支付宝支付

如果你就只想加速上个网,又担心购买 VPS 之后 IP 被墙、端口被封很麻烦,对折腾 VPS 什么的很苦恼,强烈推荐你入手,省心省时省力。

1

Just My Socks 优势:

  1. 搬瓦工(BandwagonHost)出品,值得信赖,靠谱,不会跑路。
  2. 免去个人搭建代理流程,降低科*上网门槛,更适合 初级/小白用户
  3. 全部采用 CN2 GIA/CN2 国际精品线路,线路优先级更高,速度给力。
  4. 移动/联通/电信,三家宽带都走CN2线路。
  5. 提供 5 个 IP,后台自动检测 ,被墙自动更换,保证可以用,省事省心
  6. 可随意切换Shadowsocks端口。
  7. 搬瓦工特有的IP被墙检测功能,官方可快速更新正常IP,永不被墙。

如果你是租 VPS 服务器自己搭 (ti) 子,但是又频繁被封 IP,那这个方案是很好的方案。

因为有些地区运营商的原因频繁封 IP ,不管用哪家 VPS 都一样,基本上无解,用这个方法的话确实省事很多。

二、Just My Socks 注册

点击打开 Just My Socks 官网

先选择语言为中文,然后点击 Browse ALL

2

根据自己的需求选择套餐

3

点击 购买, 进入结账页面

选择付款方式,月付是 $2.88 ,包年或者季度付会便宜一点。

4

输入 Just My Socks 优惠码JMS9272283) 点击检验代码 可享受 5.2% 的折扣

5

然后点击 CheckOut 进行支付,这时候会让你填写一些基本信息,注册账号:

6

勾选同意协议,完成订购即可

如果你点击完成订购一直无法跳转,是因为页面加载了 Google 验证,你可以开启网络代理刷新页面完成验证即可。

如果没有代理则先注册账号完成人机验证,再购买即可。

7

购买完成在 My Services下面 可以看到shadowsocks 的端口,密码和 IP 等信息(一共8个IP)

8

8-2

三、Just My Socks 使用

just my socks 怎么用呢!其实就是用 SS 客户端连接

各种客户端版本下载地址:各版本SS客户端官方下载地址

以Windows为例:

端口和加密方式等信息对应填写**(如果客户端有下图中协议和混淆选项,则协议项选择 origin,混淆项 plain,没有则不用管)**

9

填写完点击确定

在任务栏找到小飞机 并 右键开启代理 (PAC为部分流量走代理,全局为所有流量走代理)

10

连接成功

测试一下

11

请问怎么开启日志的详细模式?

用 Centos 搭建了一个酸酸乳,
就三个人用,
我想知道另外一个的浏览记录,
有人说是开启详细的日志记录
请问怎么开启日志的详细模式?

start the server return errors!

2018-01-11 08:21:15 ERROR db_transfer.py:260 Traceback (most recent call last):
File "/root/shadowsocksr/db_transfer.py", line 242, in thread_db
rows = db_instance.pull_db_all_user()
File "/root/shadowsocksr/db_transfer.py", line 367, in pull_db_all_user
import cymysql
ImportError: No module named cymysql

how can reslove the problem?

命令行local.py如何传入protocol

目前可以传入的有如下几个参数,但是实际上服务还有配置协议protocol。
所以,必须通过修改json的形式去操作吗?
我的目的是一键更换当前的节点,以方便测试节点的可用性。节点是随机从远程发送过来的。
-c CONFIG path to config file
-s SERVER_ADDR server address
-p SERVER_PORT server port, default: 8388
-b LOCAL_ADDR local binding address, default: 127.0.0.1
-l LOCAL_PORT local port, default: 1080
-k PASSWORD password
-m METHOD encryption method, default: aes-256-cfb
-o OBFS obfsplugin, default: http_simple
-t TIMEOUT timeout in seconds, default: 300
--fast-open

运行一段时间后代理主不可用了,有谁遇到过吗,感觉是 socket 超时卡住了

import socket
import time

cli = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
cli.connect(('127.0.0.1', 6001))

time.sleep(1)

cli.send(b'add: {"server_port":7001, "password":"asdfadsfasdf"}')
# ping 也一样

time.sleep(1)

data, addr = cli.recvfrom(1506)

print(data, addr)

运行上面的脚本,会一超阻塞,无法返回任何数据。

shadowsocksr 运行一段时间后莫名其妙就不行了,只能重启解决。 感觉是程序哪儿有问题,或者是因为内存泄露?

有谁遇到过类似的问题?

Readme里的install方法需要加上-b manyuser

从master分支clone的代码,协议和混淆只能选择original和plain,其他的插件都不能用
必须选用manyuser分支的代码才行。
之前破娃酱的原版没有这个问题,不知道怎么造成的?

解决openssl升级到1.1.0后shadowsocks服务报错问题

钻研shadowsocks代码, linux mint 程序包升级后 发现报错 AttributeError: /usr/lib/x86_64-Linux-gnu/libcrypto.so.1.1: undefined symbol: EVP_CIPHER_CTX_cleanup

经过查询发现openssl 最新版已经无 EVP_CIPHER_CTX_cleanup 相关。

将文件
ctypes_openssl.py

59 行 替换为 libcrypto.EVP_CIPHER_CTX_reset.argtypes = (c_void_p,)
117行替换为 libcrypto.EVP_CIPHER_CTX_reset(self._ctx)
即可正常运行

诸位开发者是否需要将此种情况加以改进?谢谢

IP没被封,服务器配置OK,但是就是没法代理

如题,连续用了一年多了,曾今由此被封了ip,然后花钱更换过。最近2天发现又不行了,这次ip没问题,服务器配置也是好的,但就是没法代理。
我尝试过

  1. 重装vps系统
  2. 重新安装ssr和ssr服务,尝试用ss替换ssr
  3. 更换端口和密码
  4. 尝试用网络上的节点(节点太多,但是没一个有效)

由于不是很懂网络和运维相关的,没去查看请求日志,希望有了解的大佬指点下。
邮箱: [email protected],或者下方留言

另外,如果开发者看到的话,希望添加一个批量测试网络节点的功能,手动切换节点太痛苦了。

shadowsocks/crypto/ctypes_openssl.py if else 缩进错误

这段代码的if-else逻辑看上去不太对吧

 from ctypes.util import find_library
    for p in ('crypto', 'eay32', 'libeay32'):
        libcrypto_path = find_library(p)
        if libcrypto_path:
            break
    else:
        raise Exception('libcrypto(OpenSSL) not found')

run error on windows

python 2.7.14 openssl 1.02n

2018-03-15 14:27:08 INFO loading libcrypto from C:\WINDOWS\system32\libeay32
.dll
Traceback (most recent call last):
File "C:\Python27\Scripts\ssserver-script.py", line 11, in
load_entry_point('shadowsocks==2.8.2', 'console_scripts', 'ssserver')()
File "c:\python27\lib\site-packages\shadowsocks\server.py", line 36, in main
daemon.daemon_exec(config)
File "c:\python27\lib\site-packages\shadowsocks\daemon.py", line 34, in daemon
_exec
raise Exception('daemon mode is only supported on Unix')
Exception: daemon mode is only supported on Unix

基本上每天2次,需要重启服务端才能正常连接

系统测试过ubuntu 16.04 和debian 8
配置文件

{
    "server": "0.0.0.0",
    "server_ipv6": "::",
    "server_port": 443,
    "local_address": "127.0.0.1",
    "local_port": 1080,

    "password": "密码xxxx",
    "method": "chacha20-ietf",
    "protocol": "auth_chain_b",
    "protocol_param": "",
    "obfs": "tls1.2_ticket_auth",
    "obfs_param": "混淆域名xxxx",
    "speed_limit_per_con": 0,
    "speed_limit_per_user": 0,

    "additional_ports": {}, // only works under multi-user mode
    "additional_ports_only": false, // only works under multi-user mode
    "timeout": 120,
    "udp_timeout": 60,
    "dns_ipv6": false,
    "connect_verbose_info": 0,
    "redirect": "",
    "fast_open": true
}

how to use shadowsocksr in terminal mode

After using cmd: python local.py -c config.json to start the SSR client in my local:

SSR still can't be used after setting following line in terminal:
export http_proxy=http://127.0.0.1:1080
export https_proxy=http://127.0.0.1:1080

but git works well:
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

More log details:
index.html have almost have ZERO file size.

oot@raspberry-desktop:/shadowsocksr/shadowsocks#
root@raspberry-desktop:
/shadowsocksr/shadowsocks# export http_proxy="socks5://localhost:9050"
root@raspberry-desktop:/shadowsocksr/shadowsocks# export http_proxy="socks5://localhost:1080"
root@raspberry-desktop:
/shadowsocksr/shadowsocks# wget www.baidu.com
Error parsing proxy URL socks5://localhost:1080: Unsupported scheme ‘socks5’.
root@raspberry-desktop:/shadowsocksr/shadowsocks# export http_proxy="http://localhost:1080"
root@raspberry-desktop:
/shadowsocksr/shadowsocks# wget www.baidu.com
--2018-01-11 09:29:42-- http://www.baidu.com/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:1080... connected.
Proxy request sent, awaiting response... 200 No headers, assuming HTTP/0.9
Length: unspecified
Saving to: ‘index.html’

index.html [ <=> ] 2 --.-KB/s in 2m 0s

2018-01-11 09:31:42 (0.02 B/s) - ‘index.html’ saved [2]

root@raspberry-desktop:/shadowsocksr/shadowsocks# cat index.html
root@raspberry-desktop:
/shadowsocksr/shadowsocks# ll index.html -lh
-rw-r--r-- 1 root root 2 1月 11 09:29 index.html
root@raspberry-desktop:~/shadowsocksr/shadowsocks#

EOF occurred in violation of protocol (_ssl.c:1056)

首先是同一个ssr 服务配置,客户端的代理 1080 是可以使用访问 search.yahoo.com 的,但如果我使用 shadowsocksr 的源码 本地端口改为1082,就会出现以下错误

urllib3.exceptions.MaxRetryError: SOCKSHTTPSConnectionPool(host='search.yahoo.com', port=443): Max retries exceeded with url:

(Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1056)')))

不知道什么原因,而且,1082只针对 search.yahoo.com 有这个问题,对于其它的网址是没问题的。

可以连接,无法科学上网

服务器端一直报错如下:

2019-09-26 09:48:32 INFO loading libcrypto from libcrypto.so.10
2019-09-26 09:48:32 INFO starting server at 0.0.0.0:443
2019-09-26 09:50:01 WARNING unsupported addrtype 169, maybe wrong password or encryption method
2019-09-26 09:50:01 ERROR can not parse header when handling connection from 119.145.137.34:26661
2019-09-26 09:50:02 WARNING unsupported addrtype 202, maybe wrong password or encryption method
2019-09-26 09:50:02 ERROR can not parse header when handling connection from 119.145.137.34:26662
2019-09-26 09:50:05 WARNING unsupported addrtype 214, maybe wrong password or encryption method
2019-09-26 09:50:05 ERROR can not parse header when handling connection from 119.145.137.40:6341
2019-09-26 09:50:06 WARNING unsupported addrtype 214, maybe wrong password or encryption method
2019-09-26 09:50:06 ERROR can not parse header when handling connection from 119.145.137.40:6342
2019-09-26 09:50:06 WARNING unsupported addrtype 214, maybe wrong password or encryption method
2019-09-26 09:50:06 ERROR can not parse header when handling connection from 119.145.137.40:6343
2019-09-26 09:50:06 WARNING unsupported addrtype 214, maybe wrong password or encryption method

请问是什么原因?密码是一致的 , 加密方法 aes-256-cfb

客户端日志:
[2019-09-24 11:03:16] [Info] Connect www.google.co.jp:443
[2019-09-24 11:03:16] [Info] Direct connect www.gstatic.com:443
[2019-09-24 11:03:16] [Info] Disconnect www.google.co.jp:443
[2019-09-24 11:03:16] [Info] Connect www.google.co.jp:443
[2019-09-24 11:03:16] [Info] Disconnect www.google.co.jp:443
[2019-09-24 11:03:21] [Info] Connect www.google.co.jp:443
[2019-09-24 11:03:22] [Info] Disconnect www.google.co.jp:443
[2019-09-24 11:03:26] [Debug] DNS query fail: apis.google.com
[2019-09-24 11:03:26] [Info] Connect apis.google.com:443
[2019-09-24 11:03:26] [Info] Disconnect apis.google.com:443

method none not supported

ssr的加密方式为none (这个意思是没加密?),命令行运行发现不识别

$ python local.py -c dark/shadowsocksr.json
INFO: loading config from dark/shadowsocksr.json
2018-01-24 18:03:19 ERROR    method none not supported

shadowsocksr.json的配置如下:

{
  "server": "xx.xxxxxd.xyz",
  "local_address": "127.0.0.1",
  "local_port": 1080,
  "method": "none",
  "obfs": "tls1.2_ticket_auth",
  "obfsparam": "",
  "password": "pass",
  "server_port": 443,
  "protocol": "auth_chain_a",
  "remark": ""
}

shadowsocksr的版本为 shadowsocks-2.8.2

_ _20180124181053

在linux下设置二级代理

python shadowsocksr-manyuser/shadowsocks/local.py -c/etc/shadowsocks.json -d start
使用以上脚本启动本地客户端。
在shadowsocks.json中如何设置代理proxy信息。我使用proxychains4试过了,国内网站好使,国外不可以。
在windows10下使用ssr客户端设置二级代理是可以翻的。但是使用proxychains4+ssr客户端就不行,我猜测可能是proxychains4的方式能被公司拦截。如何在脚本中设置proxy,类似于windows10的客户端设置二级代理那样?

SSR一开始很快 之后被限速100kb

今天从SS换ssr因为之前SS明显被限速。但是SSR就飙了几分钟也被限速100kb左右。
用的
aes-256-cfb
auth_aes128_md5
tls1.2_ticket_auth
问一下现在这种混淆也能被针对了吗

ubuntu16.04 里运行出现这个问题怎么解决

输入 : ssserver -p 443 -k password -m aes-256-cfb

输出:2019-04-26 20:46:19 INFO loading libcrypto from libcrypto.so.1.0.0
2019-04-26 20:46:19 INFO starting server at 0.0.0.0:443
Traceback (most recent call last):
File "/usr/local/bin/ssserver", line 9, in
load_entry_point('shadowsocks==2.8.2', 'console_scripts', 'ssserver')()
File "/usr/local/lib/python2.7/dist-packages/shadowsocks/server.py", line 68, in main
tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))
File "/usr/local/lib/python2.7/dist-packages/shadowsocks/tcprelay.py", line 582, in init
server_socket.bind(sa)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 13] Permission denied

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.