mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-13 12:33:40 +02:00
Replace unmaintained txsocksx with txtorcon.
This commit is contained in:
parent
382ba1e648
commit
637911ddfb
2 changed files with 8 additions and 11 deletions
|
|
@ -8,8 +8,7 @@ from twisted.internet.ssl import ClientContextFactory
|
|||
from twisted.words.protocols import irc
|
||||
from jmdaemon.message_channel import MessageChannel
|
||||
from jmbase.support import get_log, chunks
|
||||
from txsocksx.client import SOCKS5ClientEndpoint
|
||||
from txsocksx.tls import TLSWrapClientEndpoint
|
||||
from txtorcon.socks import TorSocksEndpoint
|
||||
from jmdaemon.protocol import *
|
||||
MAX_PRIVMSG_LEN = 450
|
||||
|
||||
|
|
@ -139,16 +138,14 @@ class IRCMessageChannel(MessageChannel):
|
|||
#str() casts needed else unicode error
|
||||
torEndpoint = TCP4ClientEndpoint(reactor, str(self.socks5_host),
|
||||
self.socks5_port)
|
||||
ircEndpoint = SOCKS5ClientEndpoint(str(self.serverport[0]),
|
||||
self.serverport[1], torEndpoint)
|
||||
if self.usessl.lower() == 'true':
|
||||
ctx = ClientContextFactory()
|
||||
tlsEndpoint = TLSWrapClientEndpoint(ctx, ircEndpoint)
|
||||
myRS = ClientService(tlsEndpoint, factory)
|
||||
myRS.startService()
|
||||
use_tls = True
|
||||
else:
|
||||
myRS = ClientService(ircEndpoint, factory)
|
||||
myRS.startService()
|
||||
use_tls = False
|
||||
ircEndpoint = TorSocksEndpoint(torEndpoint, self.serverport[0],
|
||||
self.serverport[1], tls=use_tls)
|
||||
myRS = ClientService(ircEndpoint, factory)
|
||||
myRS.startService()
|
||||
else:
|
||||
try:
|
||||
factory = TxIRCFactory(self)
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ setup(name='joinmarketdaemon',
|
|||
author_email='',
|
||||
license='GPL',
|
||||
packages=['jmdaemon'],
|
||||
install_requires=['txsocksx', 'pyopenssl', 'libnacl', 'joinmarketbase==0.4.1'],
|
||||
install_requires=['txtorcon', 'pyopenssl', 'libnacl', 'joinmarketbase==0.4.1'],
|
||||
zip_safe=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue