pybitmessage.network.socks4a module

SOCKS4a proxy module

exception Socks4aError(code=-1)[source]

Bases: pybitmessage.network.proxy.ProxyError

SOCKS4a error base class

errorCodes = ('Request granted', 'Request rejected or failed', 'Request rejected because SOCKS server cannot connect to identd on the client', 'Request rejected because the client program and identd report different user-ids', 'Unknown error')
class Socks4a(address=None)[source]

Bases: pybitmessage.network.proxy.Proxy

SOCKS4a proxy class

state_init()

Protocol initialisation (before connection is established)

state_pre_connect()

Handle feedback from SOCKS4a while it is connecting on our behalf

proxy_sock_name()

Handle return value when using SOCKS4a for DNS resolving instead of connecting.

class Socks4aConnection(address)[source]

Bases: pybitmessage.network.socks4a.Socks4a

Child SOCKS4a class used for making outbound connections.

state_auth_done()

Request connection to be made

state_pre_connect()

Tell SOCKS4a to initiate a connection

class Socks4aResolver(host)[source]

Bases: pybitmessage.network.socks4a.Socks4a

DNS resolver class using SOCKS4a

state_auth_done()

Request connection to be made

resolved()

Resolving is done, process the return value. To use this within PyBitmessage, a callback needs to be implemented which hasn’t been done yet.