bump to latest
This commit is contained in:
@@ -111,7 +111,7 @@ class RocksockException(Exception):
|
||||
if self.error == RS_E_SSL_GENERIC and self.failedproxy != None:
|
||||
msg += ': ' + self.failedproxy #failedproxy is repurposed for SSL exceptions
|
||||
else: #RS_ET_OWN
|
||||
msg = errordict[self.error]
|
||||
msg = errordict[self.error] + " (proxy %d)"%self.failedproxy
|
||||
return msg
|
||||
|
||||
|
||||
@@ -127,6 +127,8 @@ class RocksockProxy():
|
||||
'socks5' : RS_PT_SOCKS5,
|
||||
'http' : RS_PT_HTTP }
|
||||
self.type = typemap[type] if type in typemap else type
|
||||
if not self.type in [RS_PT_NONE, RS_PT_SOCKS4, RS_PT_SOCKS5, RS_PT_HTTP]:
|
||||
raise ValueError('Invalid proxy type')
|
||||
self.username = username
|
||||
self.password = password
|
||||
self.hostinfo = RocksockHostinfo(host, port)
|
||||
|
||||
Reference in New Issue
Block a user