Information about an incoming socks5 command.
| 42 | self.auth = False # Support authentication |
| 43 | |
| 44 | class Socks5Command(): |
| 45 | """Information about an incoming socks5 command.""" |
| 46 | def __init__(self, cmd, atyp, addr, port, username, password): |
| 47 | self.cmd = cmd # Command (one of Command.*) |
| 48 | self.atyp = atyp # Address type (one of AddressType.*) |
| 49 | self.addr = addr # Address |
| 50 | self.port = port # Port to connect to |
| 51 | self.username = username |
| 52 | self.password = password |
| 53 | def __repr__(self): |
| 54 | return 'Socks5Command(%s,%s,%s,%s,%s,%s)' % (self.cmd, self.atyp, self.addr, self.port, self.username, self.password) |
| 55 | |
| 56 | class Socks5Connection(): |
| 57 | def __init__(self, serv, conn): |