Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/t/x/txsocksx-1.13.0.2/examples/tor-irc.py   txsocksx(Download)
from twisted.internet.task import react
from twisted.words.protocols.irc import IRCClient
from twisted.protocols.policies import SpewingFactory
 
from txsocksx.client import SOCKS5ClientEndpoint
def main(reactor):
    torEndpoint = TCP4ClientEndpoint(reactor, '127.0.0.1', 9050)
    # freenode's tor endpoint
    ircEndpoint = SOCKS5ClientEndpoint('lgttsalmpw3qo4no.onion', 6667, torEndpoint)
    d = ircEndpoint.connect(SpewingFactory(TorIRCFactory()))

src/t/x/txsocksx-HEAD/examples/tor-irc.py   txsocksx(Download)
from twisted.internet.task import react
from twisted.words.protocols.irc import IRCClient
from twisted.protocols.policies import SpewingFactory
 
from txsocksx.client import SOCKS5ClientEndpoint
def main(reactor):
    torEndpoint = TCP4ClientEndpoint(reactor, '127.0.0.1', 9050)
    # freenode's tor endpoint
    ircEndpoint = SOCKS5ClientEndpoint('lgttsalmpw3qo4no.onion', 6667, torEndpoint)
    d = ircEndpoint.connect(SpewingFactory(TorIRCFactory()))