From d87792a7c7f55b17deee9dd6d6388627a4e14519 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 13 Nov 2017 12:03:21 -0800 Subject: [PATCH] finish removing Transit from code and CLI command args --- src/wormhole/server/cli.py | 4 ---- src/wormhole/server/cmd_server.py | 1 - src/wormhole/server/server.py | 2 +- src/wormhole/test/common.py | 1 - src/wormhole/test/test_server.py | 4 +--- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/wormhole/server/cli.py b/src/wormhole/server/cli.py index 9596dbd..e205413 100644 --- a/src/wormhole/server/cli.py +++ b/src/wormhole/server/cli.py @@ -41,10 +41,6 @@ LaunchArgs = _compose( "--rendezvous", default="tcp:4000", metavar="tcp:PORT", help="endpoint specification for the rendezvous port", ), - click.option( - "--transit", default="tcp:4001", metavar="tcp:PORT", - help="endpoint specification for the transit-relay port", - ), click.option( "--advertise-version", metavar="VERSION", help="version to recommend to clients", diff --git a/src/wormhole/server/cmd_server.py b/src/wormhole/server/cmd_server.py index 2bbd0a3..f73295e 100644 --- a/src/wormhole/server/cmd_server.py +++ b/src/wormhole/server/cmd_server.py @@ -15,7 +15,6 @@ class MyPlugin(object): from .server import RelayServer return RelayServer( str(self.args.rendezvous), - str(self.args.transit), self.args.advertise_version, self.args.relay_database_path, self.args.blur_usage, diff --git a/src/wormhole/server/server.py b/src/wormhole/server/server.py index b19d7f0..94b2b98 100644 --- a/src/wormhole/server/server.py +++ b/src/wormhole/server/server.py @@ -37,7 +37,7 @@ class PrivacyEnhancedSite(server.Site): class RelayServer(service.MultiService): - def __init__(self, rendezvous_web_port, transit_port, + def __init__(self, rendezvous_web_port, advertise_version, db_url=":memory:", blur_usage=None, signal_error=None, stats_file=None, allow_list=True, websocket_protocol_options=()): diff --git a/src/wormhole/test/common.py b/src/wormhole/test/common.py index e227e2d..c1c4fe9 100644 --- a/src/wormhole/test/common.py +++ b/src/wormhole/test/common.py @@ -20,7 +20,6 @@ class ServerBase: # need to talk to twisted team about only using unicode in # endpoints.serverFromString s = RelayServer("tcp:%d:interface=127.0.0.1" % self.relayport, - "XXXremovemytransit", advertise_version=advertise_version, signal_error=error) s.setServiceParent(self.sp) diff --git a/src/wormhole/test/test_server.py b/src/wormhole/test/test_server.py index f9aac5e..5482594 100644 --- a/src/wormhole/test/test_server.py +++ b/src/wormhole/test/test_server.py @@ -13,13 +13,11 @@ from ..server.database import get_db def easy_relay( rendezvous_web_port=str("tcp:0"), - transit_port=str("tcp:0"), advertise_version=None, **kwargs ): return server.RelayServer( rendezvous_web_port, - transit_port, advertise_version, **kwargs ) @@ -33,7 +31,7 @@ class RLimits(unittest.TestCase): # is easier than just passing "tcp:0" ep = endpoints.TCP4ServerEndpoint(None, 0) with patch_s("endpoints.serverFromString", return_value=ep): - s = server.RelayServer("fake", None, None) + s = server.RelayServer("fake", None) fakelog = [] def checklog(*expected): self.assertEqual(fakelog, list(expected))