unsplit txwormhole step 2: edit files
This commit is contained in:
parent
0ae8463331
commit
b2c3f49038
2
setup.py
2
setup.py
|
@ -15,7 +15,7 @@ setup(name="magic-wormhole",
|
||||||
package_dir={"": "src"},
|
package_dir={"": "src"},
|
||||||
packages=["wormhole",
|
packages=["wormhole",
|
||||||
"wormhole.blocking",
|
"wormhole.blocking",
|
||||||
"txwormhole",
|
"wormhole.twisted",
|
||||||
"wormhole.cli",
|
"wormhole.cli",
|
||||||
"wormhole.server",
|
"wormhole.server",
|
||||||
"wormhole.test",
|
"wormhole.test",
|
||||||
|
|
|
@ -2,8 +2,8 @@ from __future__ import print_function
|
||||||
import io, os, sys, json, binascii, six, tempfile, zipfile
|
import io, os, sys, json, binascii, six, tempfile, zipfile
|
||||||
from twisted.internet import reactor, defer
|
from twisted.internet import reactor, defer
|
||||||
from twisted.internet.defer import inlineCallbacks, returnValue
|
from twisted.internet.defer import inlineCallbacks, returnValue
|
||||||
from txwormhole.transcribe import Wormhole, WrongPasswordError
|
from ..twisted.transcribe import Wormhole, WrongPasswordError
|
||||||
from txwormhole.transit import TransitReceiver
|
from ..twisted.transit import TransitReceiver
|
||||||
from ..errors import TransferError
|
from ..errors import TransferError
|
||||||
from .progress import ProgressPrinter
|
from .progress import ProgressPrinter
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class TwistedReceiver:
|
||||||
tor_manager = None
|
tor_manager = None
|
||||||
if self.args.tor:
|
if self.args.tor:
|
||||||
_start = self.args.timing.add_event("import TorManager")
|
_start = self.args.timing.add_event("import TorManager")
|
||||||
from txwormhole.tor_manager import TorManager
|
from ..twisted.tor_manager import TorManager
|
||||||
self.args.timing.finish_event(_start)
|
self.args.timing.finish_event(_start)
|
||||||
tor_manager = TorManager(self._reactor, timing=self.args.timing)
|
tor_manager = TorManager(self._reactor, timing=self.args.timing)
|
||||||
# For now, block everything until Tor has started. Soon: launch
|
# For now, block everything until Tor has started. Soon: launch
|
||||||
|
|
|
@ -5,8 +5,8 @@ from twisted.internet import reactor
|
||||||
from twisted.internet.defer import inlineCallbacks, returnValue
|
from twisted.internet.defer import inlineCallbacks, returnValue
|
||||||
from ..errors import TransferError
|
from ..errors import TransferError
|
||||||
from .progress import ProgressPrinter
|
from .progress import ProgressPrinter
|
||||||
from txwormhole.transcribe import Wormhole, WrongPasswordError
|
from ..twisted.transcribe import Wormhole, WrongPasswordError
|
||||||
from txwormhole.transit import TransitSender
|
from ..twisted.transit import TransitSender
|
||||||
|
|
||||||
APPID = u"lothar.com/wormhole/text-or-file-xfer"
|
APPID = u"lothar.com/wormhole/text-or-file-xfer"
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ def send_twisted(args, reactor=reactor):
|
||||||
|
|
||||||
tor_manager = None
|
tor_manager = None
|
||||||
if args.tor:
|
if args.tor:
|
||||||
from txwormhole.tor_manager import TorManager
|
from ..twisted.tor_manager import TorManager
|
||||||
tor_manager = TorManager(reactor, timing=args.timing)
|
tor_manager = TorManager(reactor, timing=args.timing)
|
||||||
# For now, block everything until Tor has started. Soon: launch tor
|
# For now, block everything until Tor has started. Soon: launch tor
|
||||||
# in parallel with everything else, make sure the TorManager can
|
# in parallel with everything else, make sure the TorManager can
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from twisted.application import service
|
from twisted.application import service
|
||||||
from twisted.internet import reactor, defer
|
from twisted.internet import reactor, defer
|
||||||
from twisted.python import log
|
from twisted.python import log
|
||||||
from txwormhole.transit import allocate_tcp_port
|
from ..twisted.transit import allocate_tcp_port
|
||||||
from ..server.server import RelayServer
|
from ..server.server import RelayServer
|
||||||
from .. import __version__
|
from .. import __version__
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ from __future__ import print_function
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
from twisted.internet.defer import gatherResults
|
from twisted.internet.defer import gatherResults
|
||||||
from twisted.internet.threads import deferToThread
|
from twisted.internet.threads import deferToThread
|
||||||
from txwormhole.transcribe import Wormhole as twisted_Wormhole
|
from ..twisted.transcribe import Wormhole as twisted_Wormhole
|
||||||
from ..blocking.transcribe import Wormhole as blocking_Wormhole
|
from ..blocking.transcribe import Wormhole as blocking_Wormhole
|
||||||
from .common import ServerBase
|
from .common import ServerBase
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ from autobahn.twisted import websocket
|
||||||
from .. import __version__
|
from .. import __version__
|
||||||
from .common import ServerBase
|
from .common import ServerBase
|
||||||
from ..server import rendezvous, transit_server
|
from ..server import rendezvous, transit_server
|
||||||
from txwormhole.eventsource import EventSource
|
from ..twisted.eventsource import EventSource
|
||||||
|
|
||||||
class Reachable(ServerBase, unittest.TestCase):
|
class Reachable(ServerBase, unittest.TestCase):
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ from twisted.internet import defer, task, endpoints, protocol, address, error
|
||||||
from twisted.internet.defer import gatherResults, inlineCallbacks
|
from twisted.internet.defer import gatherResults, inlineCallbacks
|
||||||
from twisted.python import log, failure
|
from twisted.python import log, failure
|
||||||
from twisted.test import proto_helpers
|
from twisted.test import proto_helpers
|
||||||
from txwormhole import transit
|
from ..twisted import transit
|
||||||
from ..errors import UsageError
|
from ..errors import UsageError
|
||||||
from nacl.secret import SecretBox
|
from nacl.secret import SecretBox
|
||||||
from nacl.exceptions import CryptoError
|
from nacl.exceptions import CryptoError
|
||||||
|
|
|
@ -2,7 +2,7 @@ from __future__ import print_function
|
||||||
import json
|
import json
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
from twisted.internet.defer import gatherResults, inlineCallbacks
|
from twisted.internet.defer import gatherResults, inlineCallbacks
|
||||||
from txwormhole.transcribe import Wormhole, UsageError, WrongPasswordError
|
from ..twisted.transcribe import Wormhole, UsageError, WrongPasswordError
|
||||||
from .common import ServerBase
|
from .common import ServerBase
|
||||||
|
|
||||||
APPID = u"appid"
|
APPID = u"appid"
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
from wormhole import __version__
|
|
||||||
__version__ # hush pyflakes
|
|
|
@ -8,7 +8,7 @@ from twisted.internet.error import ConnectError
|
||||||
from twisted.web import iweb
|
from twisted.web import iweb
|
||||||
import txtorcon
|
import txtorcon
|
||||||
import ipaddr
|
import ipaddr
|
||||||
from wormhole.timing import DebugTiming
|
from ..timing import DebugTiming
|
||||||
from .transit import allocate_tcp_port
|
from .transit import allocate_tcp_port
|
||||||
|
|
||||||
# based on twisted.web.client._StandardEndpointFactory
|
# based on twisted.web.client._StandardEndpointFactory
|
||||||
|
|
|
@ -10,10 +10,10 @@ from nacl.secret import SecretBox
|
||||||
from nacl.exceptions import CryptoError
|
from nacl.exceptions import CryptoError
|
||||||
from nacl import utils
|
from nacl import utils
|
||||||
from spake2 import SPAKE2_Symmetric
|
from spake2 import SPAKE2_Symmetric
|
||||||
from wormhole import __version__
|
from .. import __version__
|
||||||
from wormhole import codes
|
from .. import codes
|
||||||
from wormhole.errors import ServerError, Timeout, WrongPasswordError, UsageError
|
from ..errors import ServerError, Timeout, WrongPasswordError, UsageError
|
||||||
from wormhole.timing import DebugTiming
|
from ..timing import DebugTiming
|
||||||
from hkdf import Hkdf
|
from hkdf import Hkdf
|
||||||
|
|
||||||
def HKDF(skm, outlen, salt=None, CTXinfo=b""):
|
def HKDF(skm, outlen, salt=None, CTXinfo=b""):
|
||||||
|
|
|
@ -9,8 +9,8 @@ from twisted.internet.defer import inlineCallbacks, returnValue
|
||||||
from twisted.protocols import policies
|
from twisted.protocols import policies
|
||||||
from nacl.secret import SecretBox
|
from nacl.secret import SecretBox
|
||||||
from hkdf import Hkdf
|
from hkdf import Hkdf
|
||||||
from wormhole.errors import UsageError
|
from ..errors import UsageError
|
||||||
from wormhole.timing import DebugTiming
|
from ..timing import DebugTiming
|
||||||
from . import ipaddrs
|
from . import ipaddrs
|
||||||
|
|
||||||
def HKDF(skm, outlen, salt=None, CTXinfo=b""):
|
def HKDF(skm, outlen, salt=None, CTXinfo=b""):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user