Git Product home page Git Product logo

shadowsocks-rm's Introduction

shadowsocks

PyPI version Build Status Coverage 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 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.

Documentation

You can find all the documentation in the [Wiki].

License

Apache License

shadowsocks-rm's People

Contributors

cicku avatar clowwindy avatar dreampuf avatar est avatar everplays avatar fa08c avatar felixonmars avatar htc550605125 avatar jackyyf avatar jlund avatar kimw avatar lazybios avatar madeye avatar mengskysama avatar mitnk avatar nekolab avatar peterfyj avatar phuslu avatar shell909090 avatar sky-chen avatar sybblow avatar v3aqb avatar watermeter 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

shadowsocks-rm's Issues

能在一台VPS运行2个服务端吗

服务1 ,端口号10000:20000
服务2,端口号30000:40000
能同时运行2个吗,已经将config.py 里的port 和 services.py 里的PORT修改成不同的,好像是不行呢

can't connect database

when i run python servers.py :

Traceback (most recent call last):
File "/root/shadowsocks/shadowsocks/dbtransfer.py", line 131, in thread_db
DbTransfer.get_instance().push_db_all_user()
File "/root/shadowsocks/shadowsocks/dbtransfer.py", line 58, in push_db_all_user
dt_transfer = self.get_servers_transfer()
File "/root/shadowsocks/shadowsocks/dbtransfer.py", line 47, in get_servers_transfer
data, addr = cli.recvfrom(1500)
timeout: timed out

我的数据库和manyuser不在同一台服务器上,不知道配置是否会不同

客户端频繁显示"空连", 服务端log里大量"Connection refused"错误

ss已经可以使用, 但是在客户端里会有大量的"空连", 查了下server的log, 没看出个所以然, 只发现下面的错误信息很多. 请问是什么原因呢?

2016, Oct 08 Sat 20:17:51 tcprelay.py[line:332] INFO connecting 127.0.0.1:8098 from [我的客户端IP]:11319
2016, Oct 08 Sat 20:17:51 tcprelay.py[line:637] DEBUG got remote error
2016, Oct 08 Sat 20:17:51 tcprelay.py[line:639] ERROR [Errno 111] Connection refused
2016, Oct 08 Sat 20:17:51 tcprelay.py[line:692] DEBUG destroy: 127.0.0.1:8098
2016, Oct 08 Sat 20:17:51 tcprelay.py[line:696] DEBUG destroying remote
2016, Oct 08 Sat 20:17:51 tcprelay.py[line:702] DEBUG destroying local
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:833] DEBUG accept
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:332] INFO connecting 127.0.0.1:8098 from [我的客户端IP]:11321
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:637] DEBUG got remote error
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:639] ERROR [Errno 111] Connection refused
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:692] DEBUG destroy: 127.0.0.1:8098
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:696] DEBUG destroying remote
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:702] DEBUG destroying local
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:833] DEBUG accept
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:332] INFO connecting 127.0.0.1:8098 from [我的客户端IP]:11323
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:637] DEBUG got remote error
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:639] ERROR [Errno 111] Connection refused
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:692] DEBUG destroy: 127.0.0.1:8098
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:696] DEBUG destroying remote
2016, Oct 08 Sat 20:17:52 tcprelay.py[line:702] DEBUG destroying local

遇到一个很奇怪的问题

服务器总是会莫名其妙的出现这样的问题
qq 20160728174753
有上传流量,但没下载流量,能连到服务器 但无法打开任何网页
必须要重启动服务器才恢复,但重启后,不超一天又会发作。

服务器内存最低 768MB-1GB 1核心 一共三台同时出现这类情况 每台服务器使用都不超过1个月。

WARNING:root:db thread except:timed out

After running a long time,maybe ten hours .
The db loop while faild,but when i restart shadiowsocks by running 'supervisorctl restart shadowsocks'. It worked.Here is the error log below.

WARNING:root:db thread except:timed out
WARNING:root:db loop
Traceback (most recent call last):
File "/www/shadowsocks/shadowsocks/dbtransfer.py", line 131, in thread_db
DbTransfer.get_instance().push_db_all_user()
File "/www/shadowsocks/shadowsocks/dbtransfer.py", line 58, in push_db_all_user
dt_transfer = self.get_servers_transfer()
File "/www/shadowsocks/shadowsocks/dbtransfer.py", line 47, in get_servers_transfer
data, addr = cli.recvfrom(1500)
timeout: timed out
WARNING:root:db thread except:timed out
WARNING:root:db loop
Traceback (most recent call last):
File "/www/shadowsocks/shadowsocks/dbtransfer.py", line 131, in thread_db
DbTransfer.get_instance().push_db_all_user()
File "/www/shadowsocks/shadowsocks/dbtransfer.py", line 58, in push_db_all_user
dt_transfer = self.get_servers_transfer()
File "/www/shadowsocks/shadowsocks/dbtransfer.py", line 47, in get_servers_transfer
data, addr = cli.recvfrom(1500)
timeout: timed out
WARNING:root:db thread except:timed out

运行servers.py 启动服务不起来

一开始老报错后来该配置文件后报这个
Traceback (most recent call last):
File "/root/shadowsocks-rm/shadowsocks/dbtransfer.py", line 206, in thread_push
DbTransfer.get_instance().push_db_all_user()
File "/root/shadowsocks-rm/shadowsocks/dbtransfer.py", line 66, in push_db_all_user
last_time = time.time()
UnboundLocalError: local variable 'time' referenced before assignment
WARNING:root:db thread except:local variable 'time' referenced before assignment

配置文件

Config

MYSQL_HOST = '127.0.0.1'
MYSQL_PORT = 3306
MYSQL_USER = 'root'
MYSQL_PASS = 'lnmp.org'
MYSQL_DB = 'sspanel'

MANAGE_PASS = 'passwd'

if you want manage in other server you should set this value to global ip

MANAGE_BIND_IP = '127.0.0.1'

make sure this port is idle

MANAGE_PORT = 15000

PANEL_VERSION = 'V2' # V2 or V3. V2 not support API
API_URL = 'http://vps.demo/mu'
API_PASS = 'mupass'
NODE_ID = '1'
CHECKTIME = 15
SYNCTIME = 600

BIND IP

if you want bind ipv4 and ipv6 '[::]'

if you want bind all of ipv4 if '0.0.0.0'

if you want bind all of if only '4.4.4.4'

SS_BIND_IP = '0.0.0.0'
SS_METHOD = 'rc4-md5'

LOG CONFIG

LOG_ENABLE = False
LOG_LEVEL = logging.DEBUG
LOG_FILE = '/var/log/shadowsocks.log'

ss-panel 无法统计流量、在线人数问题

以下是config.py内容:
import logging

Config

MYSQL_HOST = 'localhost'
MYSQL_PORT = 3306
MYSQL_USER = 'root'
MYSQL_PASS = '123456789a'
MYSQL_DB = 'sspanel'

MANAGE_PASS = 'aliyu4Seff'

if you want manage in other server you should set this value to global ip

MANAGE_BIND_IP = '127.0.0.1'

make sure this port is idle

MANAGE_PORT = 23333

PANEL_VERSION = 'V3' # V2 or V3. V2 not support API
API_URL = 'http://vps.demo.com/mu'
API_PASS = 'aliyu4Seff'
NODE_ID = '1'
CHECKTIME = 15
SYNCTIME = 600

BIND IP

if you want bind ipv4 and ipv6 '[::]'

if you want bind all of ipv4 if '0.0.0.0'

if you want bind all of if only '4.4.4.4'

SS_BIND_IP = '0.0.0.0'
SS_METHOD = 'rc4-md5'

LOG CONFIG

LOG_ENABLE = False
LOG_LEVEL = logging.DEBUG
LOG_FILE = '/var/log/shadowsocks.log'

其中 /var/log/shadowsocks.log中什么都没有。

以下是/home/www/ss-panel/.env 中的信息:
// ss-panel v3 ▒EM置
//
// !!! 修▒T▒此key为▒ZO▒\▒▒W符串确▒]▒Q▒Y▒I▒E▒ !!!
key = 'aliyu4Seff'
env = 'prod' // 正▒O▒N▒▒C请▒]▒LAenv为prod确▒~]▒I▒E▒
debug = 'false' // 正▒O▒N▒▒C请确▒]为false
appName = 'ss-panel3' //▒Y▒B▒▒PM称
baseUrl = 'http://vps.demo.com' // ▒Y▒B▒▒~\▒▒~]@
timeZone = 'PRC' // RPC 天▒~~]▒
W▒▒W▒ UTC ▒| ▒▒^W▒W▒▒W▒
pwdMethod = 'md5' // ▒
F▒| A▒J| ▒F ▒O▒▒~@I md5,sha256
salt = '' // ▒
F▒| A▒J| ▒F▒T▒▒L▒N▒W▒▒IH▒MG级请▒UY空
theme = 'default' // 主▒
X
// v3.4 ▒PN使▒T▒ session代▒[▒authDriver
// session,cache ▒O▒▒@I file/redis
session = 'file'
cache = 'file'
tokenDriver = 'db'
// mu key ▒
T▒▒N▒| ▒▒Lss-go mu▒ZD请▒B
muKey = 'aliyu4Seff'
// ▒
B▒件
mailDriver = 'mailgun' // mailgun #smtp▒M▒\▒▒T▒▒LA,▒E▒~[▒K▒U

// 注▒FL▒YP▒H▒,▒O天▒O个ip▒C▒注▒FL▒ZD次▒~U▒
ipDayLimit = '10'

// ▒B▒箱▒L▒A设置
emailVerifyEnabled = 'false' // ▒
X▒▒P▒▒@▒P▒注▒FL▒W▒▒B▒箱▒L▒A (true:▒@▒P▒ faa
lse:▒
E▒▒W▒)
emailVerifyCodeLength = '8' // ▒
B▒箱▒L▒A代▒| A▒U▒度
emailVerifyTTL = '30' // ▒L▒A代▒| A▒~~I▒UH▒W▒▒W▒ ▒MU▒M▒HF▒R_

// ▒T▒▒H▒签▒H▒设置
checkinTime = '22' // 签▒
H▒▒W▒▒ZT▒W▒▒W▒ ▒MU▒M▒O▒W▒
r
checkinMin = '93' // 签▒H▒▒~~@▒Q▒A▒GO ▒MU▒MMB
checkinMax = '97' // 签▒H▒▒~~@▒Z▒A▒G~O

//
defaultTraffic = '1' // ▒T▒▒H▒▒H]▒K▒A▒GO ▒MU▒MGB
// 注▒
FL▒PN▒N▒▒W▒ZD▒B~@请▒| A▒U▒▒GO
inviteNum = '0'

// 记▒U▒A▒GO▒W▒▒W▒H▒dynamodb ,beta,请▒K▒▒~@▒~P▒
log_traffic_dynamodb = 'false'

database ▒U▒▒M▒▒S▒E~M置

db_driver = 'mysql'
db_host = 'localhost'
db_port = '3306'
db_database = 'sspanel'
db_username = 'root'
db_password = '123456789a'
db_charset = 'utf8'
db_collation = 'utf8_general_ci'
db_prefix = ''

redis

redis_scheme = 'tcp'
redis_host = '127.0.0.1'
redis_port = '6379'
redis_database = '0'
redis_pass = ''

mailgun

mailgun_key = ''
mailgun_domain = ''
mailgun_sender = ''

smtp

smtp_host = ''
smtp_username = ''
smtp_port = ''
smtp_name = ''
smtp_sender = ''
smtp_passsword = ''
smtp_ssl = 'true'

aws

aws_access_key_id = ''
aws_secret_access_key = ''
aws_region = 'ap-northeast-1'
aws_ses_region = 'us-east-1'
aws_ses_sender = ''

现在代理可以运行,可以翻墙(有点慢),vps用的是搬瓦工的年付$19.9,安装后内存占用
RAM: 155.46/256 MB
SWAP: 108.66/128 MB
但是ss-panel 无法统计流量、在线人数问题
安装时采用这个哥们的一键安装包:

https://www.echoteen.com/yijian-sspanel-many-user.html

使用代理时putty远程连接出现以下问题:
[root@localhost shadowsocks]# python servers.py
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:one time auth fail
WARNING:root:header is too short
ERROR:root:[1025]can not parse header when handling connection from 27.211.59.191:14094
Traceback (most recent call last):
File "../shadowsocks/tcprelay.py", line 328, in _handle_stage_addr
raise Exception('[%s]can not parse header'%(self._config['server_port']))
Exception: [1025]can not parse header
ERROR:root:[Errno 32] Broken pipe
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:timed out: maps.google.com:80
Traceback (most recent call last):
File "/root/shadowsocks-rm/shadowsocks/dbtransfer.py", line 197, in thread_push
DbTransfer.get_instance().push_db_all_user()
File "/root/shadowsocks-rm/shadowsocks/dbtransfer.py", line 98, in push_db_all_user
response = urllib2.urlopen(req)
File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 475, in error
return self._call_chain(_args)
File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
result = func(_args)
File "/usr/lib64/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
WARNING:root:db thread except:HTTP Error 500: Internal Server Error
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:timed out: id.google.com.hk:443
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:unsupported addrtype 47, maybe wrong password or encryption method
ERROR:root:[1025]can not parse header when handling connection from 117.36.118.226:9368
Traceback (most recent call last):
File "../shadowsocks/tcprelay.py", line 328, in _handle_stage_addr
raise Exception('[%s]can not parse header'%(self._config['server_port']))
Exception: [1025]can not parse header
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:timed out: www.gstatic.com:443
ERROR:root:[Errno 104] Connection reset by peer
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:timed out: www.google.com.hk:443
ERROR:root:[Errno 111] Connection refused

注:整个过程(运行10分钟)多次出现(不下百次)
ERROR:root:[Errno 104] Connection reset by peer
这个错误,为了方便查看,基本只保留了少许的几条。中间流量统计同步时依旧出现
DbTransfer.get_instance().push_db_all_user()
这个错误。
那么问题来了,请问怎么解决 无法统计流量、在线人数问题?
@zuoruizhi

MU API on HTTPS server is not supported

Config file:

PANEL_VERSION = 'V3' # V2 or V3. V2 not support API
API_URL = 'https://cflink.cf/mu'
API_PASS = 'dbjakwbdw'
NODE_ID = '1'
CHECKTIME = 15
SYNCTIME = 600

Log:

2016-09-15 15:04:34:Traceback (most recent call last):
2016-09-15 15:04:34: File "/shadowsocks/shadowsocks/dbtransfer.py", line 197, in thread_push
2016-09-15 15:04:34: DbTransfer.get_instance().push_db_all_user()
2016-09-15 15:04:34: File "/shadowsocks/shadowsocks/dbtransfer.py", line 98, in push_db_all_user
2016-09-15 15:04:34: response = urllib2.urlopen(req)
2016-09-15 15:04:34: File "/usr/local/lib/python2.7/urllib2.py", line 154, in urlopen
2016-09-15 15:04:34: return opener.open(url, data, timeout)
2016-09-15 15:04:34: File "/usr/local/lib/python2.7/urllib2.py", line 429, in open
2016-09-15 15:04:34: response = self._open(req, data)
2016-09-15 15:04:34: File "/usr/local/lib/python2.7/urllib2.py", line 447, in _open
2016-09-15 15:04:34: '_open', req)
2016-09-15 15:04:34: File "/usr/local/lib/python2.7/urllib2.py", line 407, in _call_chain
2016-09-15 15:04:34: result = func(*args)
2016-09-15 15:04:34: File "/usr/local/lib/python2.7/urllib2.py", line 1241, in https_open
2016-09-15 15:04:34: context=self._context)
2016-09-15 15:04:34: File "/usr/local/lib/python2.7/urllib2.py", line 1198, in do_open
2016-09-15 15:04:34: raise URLError(err)
2016-09-15 15:04:34:URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
2016-09-15 15:04:34:WARNING:root:db thread except:<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>

运行时报错

如题。这是错误信息:

ERROR:root:[Errno 107] Transport endpoint is not connected
Traceback (most recent call last):
  File "/root/shadowsocks-rm/shadowsocks/../shadowsocks/tcprelay.py", line 787, in handle_event
    self._dns_resolver, self._is_local)
  File "/root/shadowsocks-rm/shadowsocks/../shadowsocks/tcprelay.py", line 126, in __init__
    self._client_address = local_sock.getpeername()[:2]
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected

能够修改数据库表名吗?

现在默认的是user,下一个版本可以修改这个 user 吗,或者自己修改源文件,具体需要修改那些可以告诉一下吗?谢谢

rm

下面是 supervisor 配置 。这样配置不能运行,似乎必须使用 "-c" 参数 。但是servers.py 似乎不需要这个 .conf
请教如何运行?
[program:ss-p]
command=python /home/shadowsocks-rm/shadowsocks/servers.py
autorestart=true
user=ssuser
redirect_stderr=true
stdout_logfile=/var/log/ss-p.log
stdout_logfile_maxbytes=10MB
stderr_logfile=/var/log/ss-p.err.log
stderr_logfile_maxbytes=1MB

Manyuser Branch Readme is missing socket management doc

和原来一样吗?

Manage socket

Manage server work in UDP at MANAGE_BIND_IP MANAGE_PORT

use MANAGE_PASS:port:passwd:0 to del a server at port port

use MANAGE_PASS:port:passwd:1 to run a server at port port password is passwd

Python Eg:

udpsock.sendto('MANAGE_PASS:65535:123456:1', (MANAGE_BIND_IP, MANAGE_PORT))
PHP Eg:

$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$msg = 'MANAGE_PASS:65535:123456:1';
$len = strlen($msg);
socket_sendto($sock, $msg, $len, 0, MANAGE_BIND_IP, MANAGE_PORT);
socket_close($sock);

修改端口短暂无法上网(需要安卓端chrome刷新多次才行)的原因?

看日志端口在服务器已经开启,但是怎么会去连接8.8.8.8:53(谷歌dns) 呢?

2016, Aug 26 Fri 01:15:09 dbtransfer.py[line:120] INFO db start server at port [52662] pass [IZy9OdX7]
2016, Aug 26 Fri 01:15:09 manager.py[line:86] INFO adding server at 0.0.0.0:52662
2016, Aug 26 Fri 01:15:10 tcprelay.py[line:783] DEBUG accept
2016, Aug 26 Fri 01:15:10 tcprelay.py[line:319] INFO connecting 8.8.8.8:53 from 59.172.202.244:21886
2016, Aug 26 Fri 01:15:10 tcprelay.py[line:642] DEBUG destroy: 8.8.8.8:53
然后就无法上网了
2016, Aug 26 Fri 01:15:10 tcprelay.py[line:646] DEBUG destroying remote
2016, Aug 26 Fri 01:15:10 tcprelay.py[line:652] DEBUG destroying local
刷新后,可以上网。
2016, Aug 26 Fri 01:15:11 tcprelay.py[line:783] DEBUG accept
2016, Aug 26 Fri 01:15:11 tcprelay.py[line:319] INFO connecting 31.13.95.36:443 from 59.172.202.244:21887

这属于dns污染吗?

Centos 6.5 运行后出现Name or service not known错误。

运行环境:Centos6.5+lnmp. 上面已经运行wordpress博客。
之前已经配置过shadowsocks-libev,配置了supervisord,配置文件在/etc/shadow/*.json(可以正常运行)
我目前已经把supervisord通过pip 删除。但配置文件还没删。

这台VPS配了两个IP。一个运行代理,一个运行网页。

我的config.py:

Config

MYSQL_HOST = '#代理IP#'
MYSQL_PORT = 3306
MYSQL_USER = 'user'
MYSQL_PASS = 'aabbc'
MYSQL_DB = 'ssdb'

ss-panel .env配置:

db_driver = 'mysql'
db_host = '#代理IP#'
db_port = '3306'
db_database = 'ssdb'
db_username = 'user'
db_password = 'aabbc'
db_charset = 'utf8'
db_collation = 'utf8_general_ci'
db_prefix = ''

python 是2.7版本。

运行python servers.py 出现:

Traceback (most recent call last):
File "/home/shadowsocks-rm/shadowsocks/dbtransfer.py", line 207, in thread_push
DbTransfer.get_instance().push_db_all_user()
File "/home/shadowsocks-rm/shadowsocks/dbtransfer.py", line 119, in push_db_all_user
response = urllib2.urlopen(req)
File "/usr/local/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/local/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/usr/local/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/usr/local/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/local/lib/python2.7/urllib2.py", line 1177, in do_open
raise URLError(err)
URLError: <urlopen error [Errno -2] Name or service not known>

请问需要如何解决?

IPv6的监听有问题

如题,当我设置监听地址为[::]的时候,数据库会无限读取(add {serverport....}会无限输出)并且不会监听任何端口。

在执行python时无任何反应

执行时无反应 终止时给出如下信息
^CTraceback (most recent call last):
File "servers.py", line 63, in
main()
File "servers.py", line 59, in main
time.sleep(100)
KeyboardInterrupt

统计上传流量为0

发现用最新的代码之后 统计的上传流量为0
即 user表里面的 u字段 不会增加

ss-panel 无法统计流量信息

服务可以正常运行,但是就是 不能统计流量信息
日志如下:
Traceback (most recent call last): File "/var/www/../shadowsocks-rm/shadowsocks/dbtransfer.py", line 197, in thread_push DbTransfer.get_instance().push_db_all_user() File "/var/www/../shadowsocks-rm/shadowsocks/dbtransfer.py", line 98, in push_db_all_user response = urllib2.urlopen(req) File "/usr/lib64/python2.6/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "/usr/lib64/python2.6/urllib2.py", line 397, in open response = meth(req, response) File "/usr/lib64/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python2.6/urllib2.py", line 435, in error return self._call_chain(*args) File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/usr/lib64/python2.6/urllib2.py", line 518, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 500: Internal Server Error

Inaccurate Data Recording

I am using Shadowsocks-rm Manyuser whose latest commit is b9766ce on 12 Jan 2016.

I believed that my server has used up more than 100 GBytes but the record at the database is only 24 GBytes. What's more, Shadowsocks-rm Manyuser does not report the upload data (as it did in the previous version)

WARNING:root:unsupported addrtype 198, maybe wrong password or encryption method

比较奇怪的问题,config.py和客户端的加密方式都设置的aes-256-cfb,连接成功,上网视频游戏都没问题,但是看日志里有报错,所有的连接都报这个错误,不知道是什么情况。虽然不影响使用,但是想知道是什么原因,加密方式都换成默认的RC4-MD5也是一样。
WARNING:root:unsupported addrtype 198, maybe wrong password or encryption method
ERROR:root:can not parse header when handling connection from 124.88.88.88:36931
Traceback (most recent call last):
File "../shadowsocks/tcprelay.py", line 315, in _handle_stage_addr
raise Exception('can not parse header')
Exception: can not parse header

MU的log在哪里?

我想查看MU的Log,不知道在哪里查看?或者在哪里定义的地址?

config.py里面是针对single user 的log地址吧?

Manyuser Branch 不写log?

Mnayuser branch 好像logging没用啊, 就是指定--log-file 也不行。。。
哪位帮debug一下,我没用过python

请问新版本多了一些设置怎么弄呢?

以前正常输入数据库等设置就没事了

今天新弄了发现提示错误,仔细一看设置多了这些设置
PANEL_VERSION = 'V3' # V2 or V3. V2 not support API
API_URL = 'http://domain/mu'
API_PASS = 'mupass'
NODE_ID = '1'
CHECKTIME = 15

SYNCTIME = 600

错误提示如下
Traceback (most recent call last):
File "/root/shadowsocks-rm/shadowsocks/dbtransfer.py", line 197, in thread_push
DbTransfer.get_instance().push_db_all_user()
File "/root/shadowsocks-rm/shadowsocks/dbtransfer.py", line 108, in push_db_all_user
response = urllib2.urlopen(req)
File "/usr/lib64/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib64/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
raise URLError(err)
URLError: <urlopen error [Errno -2] Name or service not known>
WARNING:root:db thread except:<urlopen error [Errno -2] Name or service not known>

运行python servers.py出错

运行python servers.py或者python server.py都会提示python: can't open file 'servers.py': [Errno 2] No such file or directory
菜鸟求指教,可能会是哪方面的问题?

WARNING:root:db loop

WARNING:root:db loop
ERROR:root:[Errno 98] Address already in use
WARNING:root:send_command response
add: {"server_port": 1053, "password":"05sc9ss"}
WARNING:root:db loop
ERROR:root:[Errno 98] Address already in use
WARNING:root:send_command response
add: {"server_port": 1053, "password":"05sc9ss"}

应该不是数据库连接的问题,看了好几遍了,配置应该没问题

看到有个之前有个Isscues有WARNING:root:db loop错误,他是因为iptables有问题,看的我的应该没事

显示端口被占用,尝试查询了1053并没有占用,vps上已经有shadowsocks,在尝试关闭后,还是有占用情况,不知道还应该查询哪个端口,请问这个错误如何解决

以下是iptables信息

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
DROP       tcp  --  anywhere             anywhere             tcp dpt:mysql
ACCEPT     icmp --  anywhere             anywhere             icmp echo-request

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination    

无法更新流量

老版本的shadowsocks-rm可以更新数据库,刚刚更新到最新版本无法更新,请帮助我解决

2016, Nov 03 Thu 17:46:17 dbtransfer.py[line:211] WARNING db thread except:(1054, u"Unknown column 'id' in 'field list'")
2016, Nov 03 Thu 17:46:17 tcprelay.py[line:692] DEBUG destroy: 8.8.8.8:53
2016, Nov 03 Thu 17:46:17 tcprelay.py[line:696] DEBUG destroying remote
2016, Nov 03 Thu 17:46:17 tcprelay.py[line:702] DEBUG destroying local
2016, Nov 03 Thu 17:46:18 tcprelay.py[line:833] DEBUG accept
2016, Nov 03 Thu 17:46:18 tcprelay.py[line:833] DEBUG accept
2016, Nov 03 Thu 17:46:18 tcprelay.py[line:833] DEBUG accept
2016, Nov 03 Thu 17:46:18 tcprelay.py[line:833] DEBUG accept
2016, Nov 03 Thu 17:46:18 tcprelay.py[line:833] DEBUG accept

多节点写入同一个数据库,导致慢查询时有发生

我就用中文了,英语太烂:
非常感谢mengskysama大大提供的程序,我现在是这样一个场景:
我在国外的3个vps上部署了shadowsocks-rm manyuser版,管理网站ss-panel放在国内的vps,数据库也是放在这个国内的vps上,3个国外的vps共用网站的数据库。

问题:
网站时而会卡一下,大部分时间还比较快,mysql做了下慢查询记录:
Time: 151209 11:08:25
User@Host: ss_lrb[ss_lrb] @ [133.130.0.0]
Thread_id: 3104 Schema: shadowsocks QC_hit: No
Query_time: 61.113150 Lock_time: 0.000190 Rows_sent: 1512 Rows_examined: 1512
SET timestamp=1449630505;
SELECT port, u, d, transfer_enable, passwd, switch, enable FROM user;

Time: 151209 11:08:44
User@Host: ss_xmg[ss_xmg] @ [163.44.0.0]
Thread_id: 3145 Schema: shadowsocks QC_hit: No
Query_time: 60.193568 Lock_time: 0.000201 Rows_sent: 904 Rows_examined: 904
SET timestamp=1449630524;
SELECT port, u, d, transfer_enable, passwd, switch, enable FROM user;
Time: 151209 11:11:06
User@Host: ss_xmg[ss_xmg] @ [163.44.0.0]
Thread_id: 3259 Schema: shadowsocks QC_hit: No
Query_time: 24.040012 Lock_time: 0.000225 Rows_sent: 1512 Rows_examined: 1512
SET timestamp=1449630666;
SELECT port, u, d, transfer_enable, passwd, switch, enable FROM user;

Time: 151209 11:12:13
User@Host: ss_xmg[ss_xmg] @ [163.44.0.0]
Thread_id: 3307 Schema: shadowsocks QC_hit: No
Query_time: 8.165709 Lock_time: 0.000247 Rows_sent: 1512 Rows_examined: 1512
SET timestamp=1449630733;
SELECT port, u, d, transfer_enable, passwd, switch, enable FROM user;

不知是不是因为持续的update,清空了select缓存并且阻塞了select,我想:
shadowsocks-rm manyuser版能不能加个功能,把select放到memcache上读取,update流量还是在mysql上,解决锁问题?

谢谢!

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.