diff --git a/newsfragments/4038.minor b/newsfragments/4038.minor new file mode 100644 index 000000000..e69de29bb diff --git a/src/allmydata/protocol_switch.py b/src/allmydata/protocol_switch.py index 6a6bf8061..3b3268b79 100644 --- a/src/allmydata/protocol_switch.py +++ b/src/allmydata/protocol_switch.py @@ -112,6 +112,9 @@ class _FoolscapOrHttps(Protocol, metaclass=_PretendToBeNegotiation): # If we're listening on Tor, the hostname needs to have an # .onion TLD. assert hostname.endswith(".onion") + # The I2P scheme is yet not supported by the HTTP client, so we + # don't want generate a NURL that won't work. This will be + # fixed in https://tahoe-lafs.org/trac/tahoe-lafs/ticket/4037 port = int(port) storage_nurls.add( build_nurl( @@ -122,10 +125,7 @@ class _FoolscapOrHttps(Protocol, metaclass=_PretendToBeNegotiation): subscheme ) ) - # TODO this is where we'll have to support Tor and I2P as well. - # See https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3888#comment:9 - # for discussion (there will be separate tickets added for those at - # some point.) + return storage_nurls def __init__(self, *args, **kwargs): diff --git a/src/allmydata/storage/http_client.py b/src/allmydata/storage/http_client.py index 9f5d6cce2..765e94319 100644 --- a/src/allmydata/storage/http_client.py +++ b/src/allmydata/storage/http_client.py @@ -375,6 +375,8 @@ class StorageClientFactory: pool=pool, tls_context_factory=tls_context_factory ) else: + # I2P support will be added here. See + # https://tahoe-lafs.org/trac/tahoe-lafs/ticket/4037 raise RuntimeError(f"Unsupported tcp connection handler: {handler}") async def create_storage_client(