proto.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:python-proxy 作者: qwj 项目源码 文件源码
def parse(self, reader, auth, authtable, sock, **kw):
        if auth:
            if (yield from reader.read_n(len(auth)-1)) != auth[1:]:
                raise Exception('Unauthorized Redir')
            authtable.set_authed()
        buf = sock.getsockopt(socket.SOL_IP, SO_ORIGINAL_DST, 16)
        return socket.inet_ntoa(buf[4:8]), int.from_bytes(buf[2:4], 'big'), b''
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号