Browse Source

fix tls1.2_ticket_auth when it as a client

dev
破娃酱 8 years ago
parent
commit
5d479087a8
  1. 2
      shadowsocks/obfsplugin/obfs_tls.py

2
shadowsocks/obfsplugin/obfs_tls.py

@ -107,7 +107,7 @@ class tls_ticket_auth(plain.plain):
ext += b"\x00\x17\x00\x00" ext += b"\x00\x17\x00\x00"
if host not in self.server_info.data.ticket_buf: if host not in self.server_info.data.ticket_buf:
self.server_info.data.ticket_buf[host] = os.urandom((struct.unpack('>H', os.urandom(2))[0] % 17 + 8) * 16) self.server_info.data.ticket_buf[host] = os.urandom((struct.unpack('>H', os.urandom(2))[0] % 17 + 8) * 16)
ext += b"\x00\x23" + struct.pack('>H', len(self.ticket_size_buf[host])) + self.ticket_size_buf[host] ext += b"\x00\x23" + struct.pack('>H', len(self.server_info.data.ticket_buf[host])) + self.server_info.data.ticket_buf[host]
ext += binascii.unhexlify(b"000d001600140601060305010503040104030301030302010203") ext += binascii.unhexlify(b"000d001600140601060305010503040104030301030302010203")
ext += binascii.unhexlify(b"000500050100000000") ext += binascii.unhexlify(b"000500050100000000")
ext += binascii.unhexlify(b"00120000") ext += binascii.unhexlify(b"00120000")

Loading…
Cancel
Save