use absolute import
This commit is contained in:
parent
89dc6031e8
commit
0814888ba5
6 changed files with 19 additions and 32 deletions
|
@ -27,14 +27,13 @@ import socket
|
|||
import struct
|
||||
import re
|
||||
import logging
|
||||
import common
|
||||
import lru_cache
|
||||
import eventloop
|
||||
|
||||
from shadowsocks import common, lru_cache, eventloop
|
||||
|
||||
|
||||
CACHE_SWEEP_INTERVAL = 30
|
||||
|
||||
VALID_HOSTNAME = re.compile("(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE)
|
||||
VALID_HOSTNAME = re.compile(r"(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE)
|
||||
|
||||
common.patch_socket()
|
||||
|
||||
|
|
|
@ -26,19 +26,17 @@ import hashlib
|
|||
import string
|
||||
import struct
|
||||
import logging
|
||||
import crypto.m2
|
||||
import crypto.rc4_md5
|
||||
import crypto.salsa20_ctr
|
||||
import crypto.ctypes_openssl
|
||||
|
||||
from shadowsocks.crypto import m2, rc4_md5, salsa20_ctr, ctypes_openssl
|
||||
|
||||
|
||||
method_supported = {}
|
||||
|
||||
method_supported.update(crypto.rc4_md5.ciphers)
|
||||
method_supported.update(crypto.salsa20_ctr.ciphers)
|
||||
method_supported.update(crypto.ctypes_openssl.ciphers)
|
||||
method_supported.update(rc4_md5.ciphers)
|
||||
method_supported.update(salsa20_ctr.ciphers)
|
||||
method_supported.update(ctypes_openssl.ciphers)
|
||||
# let M2Crypto override ctypes_openssl
|
||||
method_supported.update(crypto.m2.ciphers)
|
||||
method_supported.update(m2.ciphers)
|
||||
|
||||
|
||||
def random_string(length):
|
||||
|
|
|
@ -25,12 +25,8 @@ import sys
|
|||
import os
|
||||
import logging
|
||||
import signal
|
||||
import utils
|
||||
import encrypt
|
||||
import eventloop
|
||||
import tcprelay
|
||||
import udprelay
|
||||
import asyncdns
|
||||
|
||||
from shadowsocks import utils, encrypt, eventloop, tcprelay, udprelay, asyncdns
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -25,12 +25,8 @@ import sys
|
|||
import os
|
||||
import logging
|
||||
import signal
|
||||
import utils
|
||||
import encrypt
|
||||
import eventloop
|
||||
import tcprelay
|
||||
import udprelay
|
||||
import asyncdns
|
||||
|
||||
from shadowsocks import utils, encrypt, eventloop, tcprelay, udprelay, asyncdns
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -28,10 +28,9 @@ import struct
|
|||
import logging
|
||||
import traceback
|
||||
import random
|
||||
import encrypt
|
||||
import eventloop
|
||||
import utils
|
||||
from common import parse_header
|
||||
|
||||
from shadowsocks import encrypt, eventloop, utils
|
||||
from shadowsocks.common import parse_header
|
||||
|
||||
|
||||
TIMEOUTS_CLEAN_SIZE = 512
|
||||
|
|
|
@ -72,10 +72,9 @@ import logging
|
|||
import struct
|
||||
import errno
|
||||
import random
|
||||
import encrypt
|
||||
import eventloop
|
||||
import lru_cache
|
||||
from common import parse_header, pack_addr
|
||||
|
||||
from shadowsocks import encrypt, eventloop, lru_cache
|
||||
from shadowsocks.common import parse_header, pack_addr
|
||||
|
||||
|
||||
BUF_SIZE = 65536
|
||||
|
|
Loading…
Reference in a new issue