Merge remote-tracking branch 'origin/master' into 3903.nix-flake.2

This commit is contained in:
Jean-Paul Calderone 2023-07-21 09:33:27 -04:00
commit 8dc86c9870
7 changed files with 21 additions and 13 deletions

View File

@ -164,18 +164,20 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- os: macos-12
python-version: "3.11"
force-foolscap: false
- os: windows-latest
python-version: "3.11"
force-foolscap: false
os:
# 22.04 has some issue with Tor at the moment:
# https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3943
- ubuntu-20.04
- macos-12
- windows-latest
python-version:
- "3.11"
force-foolscap:
- false
include:
- os: ubuntu-20.04
python-version: "3.10"
force-foolscap: false
force-foolscap: true
steps:
- name: Install Tor [Ubuntu]

0
newsfragments/4038.minor Normal file
View File

0
newsfragments/4040.minor Normal file
View File

0
newsfragments/4046.minor Normal file
View File

View File

@ -837,7 +837,11 @@ class _Client(node.Node, pollmixin.PollMixin):
if hasattr(self.tub.negotiationClass, "add_storage_server"):
nurls = self.tub.negotiationClass.add_storage_server(ss, swissnum.encode("ascii"))
self.storage_nurls = nurls
announcement[storage_client.ANONYMOUS_STORAGE_NURLS] = [n.to_text() for n in nurls]
# There is code in e.g. storage_client.py that checks if an
# announcement has changed. Since NURL order isn't meaningful,
# we don't want a change in the order to count as a change, so we
# send the NURLs as a set. CBOR supports sets, as does Foolscap.
announcement[storage_client.ANONYMOUS_STORAGE_NURLS] = {n.to_text() for n in nurls}
announcement["anonymous-storage-FURL"] = furl
enabled_storage_servers = self._enable_storage_servers(

View File

@ -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):

View File

@ -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(