Expand description
Local server used to communicate with the peer core. Handles external client connections (HTTP/WebSocket).
This module acts as the bridge between external clients and the Freenet node’s core logic.
It parses ClientRequests, sends them to the main node event loop (node::Node) via an
internal channel, and forwards HostResponses back to the clients.
See ../architecture.md for its place in the overall architecture.
Structs§
- Origin
Contract - Represents an origin contract entry with metadata for token expiration.
- WebApp
Functions§
- is_
private_ ip - Returns
trueif the IP is a private/local address suitable for LAN access. - serve_
client_ api - serve_
client_ api_ for_ test - Serves the client API and returns the concrete types (for integration testing). This allows tests to access internal state like the origin_contracts map.
- serve_
client_ api_ with_ listener - Like
serve_client_apibut reuses a pre-bound TCP listener, avoiding the release-then-rebind race window that causes port conflicts in parallel tests. - serve_
client_ api_ with_ listener_ and_ contracts - Like
serve_client_api_with_listenerbut also returns theOriginContractMap. - validate_
source_ cidr - Validates a single operator-supplied CIDR for the local-API allowlist.
Type Aliases§
- Origin
Contract Map - Maps authentication tokens to origin contract metadata.