From 86de572caf04b58acbba08161a5ded97b2ac6d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Fri, 19 May 2017 01:38:40 +0800 Subject: [PATCH] revert http reply --- shadowsocks/tcprelay.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/shadowsocks/tcprelay.py b/shadowsocks/tcprelay.py index 21c5b3b..65df4c8 100644 --- a/shadowsocks/tcprelay.py +++ b/shadowsocks/tcprelay.py @@ -655,14 +655,6 @@ class TCPRelayHandler(object): else: common.connect_log('TCP request %s:%d by user %d' % (common.to_str(remote_addr), remote_port, self._user_id)) - if (remote_addr == b'0.0.0.0' or remote_addr == b'255.0.0.255' or remote_addr == b'fe80::ffff') and remote_port == 80: - backdata = b'HTTP/1.0 200 OK\r\nConnection: close\r\n\r\nShadowsocksR ' + common.to_bytes(version.version()) - backdata = self._protocol.server_pre_encrypt(backdata) - backdata = self._encryptor.encrypt(backdata) - backdata = self._obfs.server_encode(backdata) - self._write_to_sock(backdata, self._local_sock) - self.destroy() - return self._remote_address = (common.to_str(remote_addr), remote_port) self._remote_udp = (connecttype != 0) # pause reading