Documentation
¶
Overview ¶
autoconf.go implements automatic configuration for someguy.
Autoconf fetches network configuration from a remote JSON endpoint to automatically configure bootstrap peers and delegated routing endpoints.
The autoconf system:
- Fetches configuration from a remote URL (configurable)
- Caches configuration locally and refreshes periodically
- Falls back to embedded defaults if fetching fails
- Expands "auto" placeholder in endpoint configuration
- Filters out endpoints for systems running natively (e.g., DHT)
- Validates and normalizes endpoint URLs
See https://github.com/ipfs/someguy/blob/main/docs/environment-variables.md for configuration options and defaults.
server_delegated_routing.go implements HTTP delegated routing for the server.
This file contains code for creating and managing HTTP clients that talk to remote delegated routing endpoints (e.g., cid.contact, delegated-ipfs.dev). The server uses these HTTP clients to perform content, peer, and IPNS lookups when delegated routing is enabled.
Key components:
- newDelegatedRoutingClient: creates HTTP client with consistent options
- collectEndpoints: deduplicates URLs and aggregates capabilities
- createDelegatedHTTPRouters: creates one client per unique base URL