Information about an incoming socks5 command.
| 115 | self.destinations_factory = None |
| 116 | |
| 117 | class Socks5Command(): |
| 118 | """Information about an incoming socks5 command.""" |
| 119 | def __init__(self, cmd, atyp, addr, port, username, password): |
| 120 | self.cmd = cmd # Command (one of Command.*) |
| 121 | self.atyp = atyp # Address type (one of AddressType.*) |
| 122 | self.addr = addr # Address |
| 123 | self.port = port # Port to connect to |
| 124 | self.username = username |
| 125 | self.password = password |
| 126 | def __repr__(self): |
| 127 | return 'Socks5Command(%s,%s,%s,%s,%s,%s)' % (self.cmd, self.atyp, self.addr, self.port, self.username, self.password) |
| 128 | |
| 129 | class Socks5Connection(): |
| 130 | def __init__(self, serv, conn): |