non-tor AuthTokens
authorJoey Hess <joeyh@joeyh.name>
Mon, 7 Jul 2025 19:10:15 +0000 (15:10 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 7 Jul 2025 19:10:15 +0000 (15:10 -0400)
commit46ee651c9438a5dfc430b231089d3ac1e0d09e3c
tree788b1ee7857ca816e0616563cce1710bd61dd6ec
parent2de27751d6c81f1842aa762fbd7e01d84968896e
non-tor AuthTokens

As groundwork for making git-annex p2p support other P2P networks than
tor hidden services, when an AuthToken is not a TorAnnex value, but
something else (that will be added later), store the P2PAddress that it
will be used with along with the AuthToken. And in loadP2PAuthTokens,
only return AuthTokens for the specified P2PAddress.

See commit 2de27751d6c81f1842aa762fbd7e01d84968896e for some design work
that led to this.

Also, git-annex p2p --gen-addresses is changed to generate a separate
AuthToken for every P2P address. Rather than generating a single
AuthToke and using it for every one. When we have more than just tor,
this will be important for security, to avoid a compromise of one P2P
network exposing the AuthToken used for another network.
Command/P2P.hs
P2P/Auth.hs
RemoteDaemon/Transport/Tor.hs