Files
Shadowsocks-For-WHMCS/Server/shadowsocks/utils.pyc

119 lines
8.3 KiB
Plaintext
Raw Normal View History

2016-05-27 11:18:25 +08:00
<EFBFBD><EFBFBD>
T#zUc@s<>ddkZddkZddkZddkZddkZdZd<00>Zd<00>Zd<00>Zd<00>Z d<00>Z
d<00>Z d <00>Z d
<00>Z d <00>Zd <00>ZdS( i<><69><EFBFBD><EFBFBD>NicCsEti}|ddjo|ddjpdGHtid<00>ndS(NiiiisPython 2.6 or 2.7 required(tsyst version_infotexit(tinfo((s"/home/wwwroot/shadowsocks/utils.pyt check_python"s "cCsKd}y"ddk}|id<00>i}Wntj
onXd|GHdS(Nti<><69><EFBFBD><EFBFBD>t shadowsockssshadowsocks %s(t pkg_resourcestget_distributiontversiont Exception(R R((s"/home/wwwroot/shadowsocks/utils.pytprint_shadowsocks)s cCs^d}tii|<00>o|Stiitiit<00>dd<00>}tii|<00>o|SdS(Ns config.jsons../(tostpathtexiststjointdirnamet__file__tNone(t config_path((s"/home/wwwroot/shadowsocks/utils.pyt find_config3s$cCs<>|idd<00>djotid<00>n|idd<00>djo#tid|d|d f<16>n|id
d<00>pdi<00>djotid <00>n|id
d<00>pdi<00>d jotid <00>n|idd<00>djo$tidt|id<00><00><16>n|idd<00>djo$tidt|id<00><00><16>n|id<00>djotid<00>td<00>ndS(Nt local_addressRs0.0.0.0s7warning: local set to listen 0.0.0.0, which is not safetservers 127.0.0.1t localhosts2warning: server set to listen %s:%s, are you sure?t server_porttmethodsGwarning: table is not safe; please use a safer cipher, like AES-256-CFBtrc4sEwarning: RC4 is not safe; please use a safer cipher, like AES-256-CFBttimeouti,ids(warning: your timeout %d seems too shortiXs'warning: your timeout %d seems too longtpasswordt
mypasswordsbarfoo!sADON'T USE DEFAULT PASSWORD! Please change it in your config.json!i(s0.0.0.0(s 127.0.0.1R(Rsbarfoo!(tgettloggingtwarntlowertintterrorR(tconfig((s"/home/wwwroot/shadowsocks/utils.pyt check_config=s$ &&   cCs<>tidtidddd<00>|od}dg}nd}dd g}y<>t<00>}titid
||<00>\}}x+|D]#\}}|d jo
|}q<>q<>W|o<>tid |<16>t|d <00>i i
<00>}z^|~} yt i | dt <00>}
Wn5tj
o)} tid| i<00>tid
<00>nXWdQXnh}
titid
||<00>\}}d} x<>|D]<5D>\}}|djot|<00>|
d<qu|djo||
d<qu|djot|<00>|
d<qu|djo||
d<qu|djo||
d<qu|djo||
d<qu|djo| d
7} | |
d<qu|djot|<00>|
d <qu|d!jot|
d"<qu|d#jo||
d$<qu|d%jo*|o t<00>nt<00>tid<00>qu|d&jo| d
8} | |
d<ququWWn<tij
o-} ti| IJt|<00>tid'<00>nX|
p(tid(<00>t|<00>tid'<00>n|
idd<00>|
d<|
idd)<00>|
d<|
id*d<00>|
d*<t|
id d+<00><00>|
d <|
id"t<00>|
d"<|
id$d
<00>|
d$<|
idt<00>|
d<|
idd,<00>|
d<|
idd-<00>|
d<|oB|
idd<00>djo%tid.<00>t<00>tid'<00>q<>n|
idd/<00>|
d<|
idd0<00>|
d<d|
jo|
dp(tid1<00>t|<00>tid'<00>ngtid2<00>_titd3<00>|
dd'jo
t} nd|
dd
jo ti } nF|
dd4jo ti!} n(|
dd5jo ti"} n
ti} tid| dd6d7d8dd<00>t#|
<00>|
S(9Ntleveltformats%(levelname)-s: %(message)stfilemodesa+shs:b:p:k:l:m:c:t:vqs fast-openshs:p:k:m:c:t:vqsworkers:is-csloading config from %strbt object_hooks!found an error in config.json: %sis-pRs-kRs-lt
local_ports-sRs-mRs-bRs-vtverboses-tRs --fast-opent fast_opens --workerstworkerss-hs-qisconfig not specifieds aes-256-cfbt port_passwordi,s 127.0.0.1i8sserver addr not specifieds0.0.0.0i<EFBFBD> spassword not specifiedRtVERBOSEi<45><69><EFBFBD><EFBFBD>i<EFBFBD><69><EFBFBD><EFBFBD>s'%(asctime)s %(levelname)-8s %(message)stdatefmts%Y-%m-%d %H:%M:%S($Rt basicConfigtINFORtgetoptRtargvRtopent__exit__t __enter__tjsontloadt _decode_dictt
ValueErrorR#tmessageRR"tTruetprint_local_helptprint_server_helpt GetoptErrortstderrt
print_helpRRtFalset getLoggerthandlerst addLevelNamet VERBOSE_LEVELtDEBUGtWARNtERRORR%(tis_localt shortoptstlongoptsRtoptlisttargstkeytvaluet_[1]tfR$tetv_countR&((s"/home/wwwroot/shadowsocks/utils.pyt
get_configUs<>    "  & 
"        
      
 
 
  

     
cCs|o t<00>nt<00>dS(N(R?R@(RL((s"/home/wwwroot/shadowsocks/utils.pyRC<00>s cCs dGHdS(Nsvusage: sslocal [-h] -s SERVER_ADDR [-p SERVER_PORT]
[-b LOCAL_ADDR] [-l LOCAL_PORT] -k PASSWORD [-m METHOD]
[-t TIMEOUT] [-c CONFIG] [--fast-open] [-v] [-q]
optional arguments:
-h, --help show this help message and exit
-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
-t TIMEOUT timeout in seconds, default: 300
-c CONFIG path to config file
--fast-open use TCP_FASTOPEN, requires Linux 3.7+
-v, -vv verbose mode
-q, -qq quiet mode, only show warnings/errors
Online help: <https://github.com/clowwindy/shadowsocks>
((((s"/home/wwwroot/shadowsocks/utils.pyR?<00>scCs dGHdS(NsNusage: ssserver [-h] [-s SERVER_ADDR] [-p SERVER_PORT] -k PASSWORD
-m METHOD [-t TIMEOUT] [-c CONFIG] [--fast-open]
[--workers WORKERS] [-v] [-q]
optional arguments:
-h, --help show this help message and exit
-s SERVER_ADDR server address, default: 0.0.0.0
-p SERVER_PORT server port, default: 8388
-k PASSWORD password
-m METHOD encryption method, default: aes-256-cfb
-t TIMEOUT timeout in seconds, default: 300
-c CONFIG path to config file
--fast-open use TCP_FASTOPEN, requires Linux 3.7+
--workers WORKERS number of workers, available on Unix/Linux
-v, -vv verbose mode
-q, -qq quiet mode, only show warnings/errors
Online help: <https://github.com/clowwindy/shadowsocks>
((((s"/home/wwwroot/shadowsocks/utils.pyR@<00>scCs<>g}x~|D]v}t|t<00>o|id<00>}nAt|t<00>ot|<00>}n!t|t<00>ot|<00>}n|i|<00>q W|S(Nsutf-8(t
isinstancetunicodetencodetlistt _decode_listtdictR;tappend(tdatatrvtitem((s"/home/wwwroot/shadowsocks/utils.pyR\<00>scCs<>h}x<>|i<00>D]<5D>\}}t|t<00>o|id<00>}nt|t<00>o|id<00>}nAt|t<00>ot|<00>}n!t|t<00>ot|<00>}n|||<qW|S(Nsutf-8(t iteritemsRXRYRZR[R\R]R;(R_R`RQRR((s"/home/wwwroot/shadowsocks/utils.pyR;
s (R R9RR4RRHRR RR%RWRCR?R@R\R;(((s"/home/wwwroot/shadowsocks/utils.pyt<module>s      
 t