Browse Source

bump

improve rand size
dev
破娃酱 8 years ago
parent
commit
76fd4296a5
  1. 6
      CHANGES
  2. 2
      shadowsocks/obfsplugin/auth.py
  3. 1
      shadowsocks/tcprelay.py
  4. 1
      shadowsocks/udprelay.py
  5. 2
      shadowsocks/version.py

6
CHANGES

@ -1,3 +1,9 @@
3.1.1 2017-03-25
- add "New session ticket"
- ignore bind 10.0.0.0/8 and 192.168.0.0/16 by default
- improve rand size under auth_aes128_*
- fix bugs
3.1.0 2017-03-16 3.1.0 2017-03-16
- add "glzjinmod" interface - add "glzjinmod" interface
- rate limit - rate limit

2
shadowsocks/obfsplugin/auth.py

@ -1186,7 +1186,7 @@ class auth_aes128_sha1(auth_base):
self.server_info.data.set_max_client(max_client) self.server_info.data.set_max_client(max_client)
def rnd_data_len(self, buf_size, full_buf_size): def rnd_data_len(self, buf_size, full_buf_size):
if buf_size > 1300 or self.last_rnd_len > 1300 or full_buf_size > 1492: if buf_size > 1300 or self.last_rnd_len > 1300 or full_buf_size >= self.server_info.buffer_size:
return 0 return 0
if buf_size > 1100: if buf_size > 1100:
return common.ord(os.urandom(1)[0]) % 128 return common.ord(os.urandom(1)[0]) % 128

1
shadowsocks/tcprelay.py

@ -184,6 +184,7 @@ class TCPRelayHandler(object):
server_info.key = self._encryptor.cipher_key server_info.key = self._encryptor.cipher_key
server_info.head_len = 30 server_info.head_len = 30
server_info.tcp_mss = 1448 server_info.tcp_mss = 1448
server_info.buffer_size = BUF_SIZE
self._protocol.set_server_info(server_info) self._protocol.set_server_info(server_info)
self._redir_list = config.get('redirect', ["*#0.0.0.0:0"]) self._redir_list = config.get('redirect', ["*#0.0.0.0:0"])

1
shadowsocks/udprelay.py

@ -928,6 +928,7 @@ class UDPRelay(object):
server_info.key = encrypt.encrypt_key(self._password, self._method) server_info.key = encrypt.encrypt_key(self._password, self._method)
server_info.head_len = 30 server_info.head_len = 30
server_info.tcp_mss = 1440 server_info.tcp_mss = 1440
server_info.buffer_size = BUF_SIZE
self._protocol.set_server_info(server_info) self._protocol.set_server_info(server_info)
self._sockets = set() self._sockets = set()

2
shadowsocks/version.py

@ -16,5 +16,5 @@
# under the License. # under the License.
def version(): def version():
return '3.1.0 2017-03-16' return '3.1.1 2017-03-25'

Loading…
Cancel
Save