Expand description
The HTTP client every request Ojak sends goes through.
An ActivityPub server fetches and posts to URLs other servers name, so anything that reaches its network is reachable by anyone who can name a URL. This client refuses the addresses a public server has no business contacting — loopback, private, link-local, shared and reserved ranges — and it decides on the addresses DNS returns, after resolution, so that a name that passed a check cannot be pointed somewhere else before the connection is made. Literal IP addresses in a URL, and every hop of a redirect, are checked the same way.
An application running against a peer on its own network, in development
or tests, allows that network explicitly with
ClientConfig::allow_private.
Structs§
- Client
- The guarded client. Cheap to clone; clones share a connection pool.
- Client
Config - How the client behaves.
- Response
- A response, read in full.
Enums§
- Request
Error - Why a request was not answered.
Functions§
- is_
public - Whether
addressis on the public internet. - validate_
url - Check a URL before requesting it: its scheme, and its host when the host is a literal address, which DNS never sees.