-
Notifications
You must be signed in to change notification settings - Fork 6
feat: enable using an HTTP block provider as a routing backend #110
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
Conversation
59bb83a to
a7f4096
Compare
a7f4096 to
bf995c9
Compare
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
e321a2a to
e820148
Compare
…w disabling the dht entirely
e820148 to
992a0c2
Compare
- finish sooner rather than waiting 30s (DefaultRoutingTimeout) - dont return unactionable errors to end user, everything other than HTTP 200 should produce empty /routing/v1/providers result set
9cf4b6e to
5fb5c32
Compare
lidel
left a comment
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.
@aschmahmann pushed tests, docs, and small fixes (hard 5s timeout).
I also updated description of this PR with example how to use it.
This should be good enough to merge & release and ask for feedback – lmk if I should make a release with this.
|
Yep @lidel, LGTM. Merge + release whenever you're ready. |
fixes #109
docs/environment-variables.mdDemo
Start someguy as
/routing/v1proxy for gateway atdag.w3s.link:$ SOMEGUY_HTTP_BLOCK_PROVIDER_ENDPOINTS="https://dag.w3s.link" SOMEGUY_HTTP_BLOCK_PROVIDER_PEERIDS="QmaSDHYKwuUKTvnsGwqutEZWg5jrpzLJhDHaYRQ9VvrDyZ" SOMEGUY_DHT=disabled SOMEGUY_PROVIDER_ENDPOINTS="" ./someguy startCID that is at
dag.w3s.link:If CID is not at gateway, there will be no providers returned.
Important
Set explicit
SOMEGUY_PROVIDER_ENDPOINTS=""to disable implicit default of queryingcid.contact, andSOMEGUY_DHT=disabledto also disable DHT backend, and only query definedSOMEGUY_HTTP_BLOCK_PROVIDER_ENDPOINTS.