mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-28 20:24:59 +08:00
pathoc: use idna encoding for hostnames
This commit is contained in:
@@ -241,7 +241,7 @@ class Pathoc(tcp.TCPClient):
|
||||
|
||||
def http_connect(self, connect_to):
|
||||
self.wfile.write(
|
||||
b'CONNECT %s:%d HTTP/1.1\r\n' % (connect_to[0].encode(), connect_to[1]) +
|
||||
b'CONNECT %s:%d HTTP/1.1\r\n' % (connect_to[0].encode("idna"), connect_to[1]) +
|
||||
b'\r\n'
|
||||
)
|
||||
self.wfile.flush()
|
||||
|
||||
Reference in New Issue
Block a user