This repository was archived by the owner on Jan 6, 2026. It is now read-only.
[WIP] HTTP probing: support /tls/http multiaddrs #141
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
HTTP probing: support /tls/http multiaddrs
According to libp2p specs, both
/httpsand/tls/httpare valid multiaddr for HTTPS providers, but spark only tests/https. This PR adds support for/tls/httpmultiaddrs.Plan:
/tls/httpmultiaddrs (initially failing)multiaddrToHttpUrlfunction to handle/tls/httppatterns/tls/httptest casesChanges Made:
test/multiaddr.test.js: Added 5 new test cases for/tls/httpmultiaddr patterns:/ip4/127.0.0.1/tcp/443/tls/http→https://127.0.0.1/ip4/127.0.0.1/tcp/8080/tls/http→https://127.0.0.1:8080/dns/meridian.space/tcp/8080/tls/http→https://meridian.space:8080/dns/meridian.space/tls/http→https://meridian.space/ip4/127.0.0.1/tls/http→https://127.0.0.1lib/multiaddr.js: Updated parsing logic to handle two/tls/httppatterns:/tls/http(without TCP port) - treated as/https/tcp/port/tls/http- treated as/tcp/port/httpsVerification:
/tls/httptest cases passFixes #139.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.