-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: no implicit filtering of proxied IPNI results #85
Conversation
Since we don't have HTTP retrieval client in golang (boxo) yet, the default filter in boxo/routing/http/client does not include transport-ipfs-gateway-http yet, which means someguy as a proxy was filtering them out, making them unavailable to JS clients that DO have HTTP support (e.g. SW gateway at inbrowser.link). This overrides implicit filters with explicit ones that include transport-ipfs-gateway-http restoring those IPNI results from cid.contact.
server.go
Outdated
drclient.WithProtocolFilter([]string{ | ||
"unknown", // allow results without protocol list, allowing end user to do libp2p Identify probe to test them | ||
"transport-bitswap", | ||
"transport-ipfs-gateway-http", | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what someguy is doing (i.e. serving as a proxy) why not let all protocol through rather than limiting them?
e.g. why shouldn't GraphSync peers, or those from some new protocol show up here without being explicitly added?
Given that programmatic clients that want to use the data for content routing directly (e.g. helia) will send their own filters to be layered on top pre-filtering the data doesn't seem necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested version: Changes in configuration file(s): (empty)
Cutting a Release (and modifying non-markdown files)This PR is modifying both Automatically created GitHub ReleaseA draft GitHub Release has been created. |
Problem
Because we don't have HTTP retrieval client in golang (boxo) yet, the
DefaultProtocolFilter
inboxo/routing/http/client
does not includetransport-ipfs-gateway-http
yet.This had unintended consequence at delegated-ipfs.dev because someguy as a proxy CLIENT to
https://cid.contact/routing/v1
, was running with default filters and as a client, was filteringtransport-ipfs-gateway-http
out.Then, when acting as delegated routing SERVER, it no longer had them, which made these results unavailable to JS clients, even when they DO have HTTP support (e.g. SW gateway at https://inbrowser.link), even if they included it in explicit
?filter-protocols=unknown,transport-bitswap,transport-ipfs-gateway-http
queries sent to delegated-ipfs.dev.cc @2color @SgtPooki for visibility
Fix
This PR overrides implicit delegated routing CLIENT filters with explicit empty one.
This restores those IPNI results (from cid.contact), allowing clients that need them, to get them.
(clients that that do not need them, can still skip them by passing explicit
filter-protocol
list without this protocol)Before (v0.5.2)
(no
transport-ipfs-gateway-http
results)After (this PR, once merged will be v0.5.3)