Ktistec::Network
Utilities for network operations.
Constants
Instance methods
Fetches the specified URL via HTTP GET.
When key_pair is supplied, the request is signed; pass nil
(or use the no-key-pair overload) for unsigned requests.
Will automatically follow attempts redirects (default 10).
The response body is capped at max_bytes; responses whose
Content-Length exceeds the cap are rejected before any body
bytes are read, and streamed bodies are aborted if they grow
past the cap.
When deadline is supplied, every blocking operation is bounded
by the time remaining, and DeadlineExceeded is raised -- before
any I/O -- once it is spent.
Reads up to max bytes from io into a String. Raises if io
has more bytes available past the limit.
Rechecks deadline between reads.
Reads up to max bytes from io into a String. Raises if io
has more bytes available past the limit.
Rechecks deadline between reads.
Reads up to max bytes from io into a String. Raises if io
has more bytes available past the limit.
Rechecks deadline between reads.
Reads up to max bytes from io into a String. Raises if io
has more bytes available past the limit.
Rechecks deadline between reads.
Reads up to max bytes from io into a String. Raises if io
has more bytes available past the limit.
Rechecks deadline between reads.
Reads up to max bytes from io into a String. Raises if io
has more bytes available past the limit.
Rechecks deadline between reads.
Reads up to max bytes from io into a String. Raises if io
has more bytes available past the limit.
Rechecks deadline between reads.
Sends a HTTP POST to the specified URL.
Signs the request internally with key_pair.
The returned response carries up to MAX_POST_RESPONSE_BYTES of
the response body.
Does not follow redirects.
Returns true if addr is a destination Ktistec is willing to
send outbound HTTP to on behalf of untrusted (federated) input.
Looks up addr in the IANA Special-Purpose Address Registry
and applies Ktistec's SSRF policy to the most-specific match:
- No match: address is in unallocated/globally-reachable space per IANA convention → allow.
- Matched entry's
globally_reachableis false → reject. - Matched entry's
globally_reachableis true but the entry is in the application policy set → reject. - Otherwise → allow.