finish removing Transit from code and CLI command args
This commit is contained in:
parent
a804365536
commit
d87792a7c7
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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=()):
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user