Skip to main content

Module confirm_peer

Module confirm_peer 

Source
Expand description

Where the process that sends a headless sign-in’s confirm stands. The confirm is the person’s own answer, so it is taken only from a process that is found and is outside every agent’s process tree. One from inside an agent’s tree, one whose process cannot be found (the lookup failed, or the peer is not on IPv4 loopback) and one that came through a proxy or a tunnel (it carries forwarding headers) are refused, and the refusal says what works. Every confirm is recorded by super::local_session.

Structs§

Conn 🔒
Both ends of a connection as the listener accepted it. The peer alone is not enough to find who holds the other end: the server’s own end is whichever listener took the connection, not always the web port.

Constants§

REFUSED_TEXT 🔒
What an agent that sent a confirm is told.
UNKNOWN_TEXT 🔒
What is told when the confirm’s sender could not be found, or came through a proxy: it was not taken, and the person’s own terminal on this machine, or their own browser on the printed address and code, still works.

Functions§

classify 🔒
How the confirm that arrived on conn was sent. It reads the process table, so it runs off the async threads.
classify_now 🔒
is_forwarded 🔒
Whether the request came through a proxy or a tunnel, by the headers one adds. The real client sends none of them.
plain_peer 🔒
refusal_text 🔒
The text of a confirm that was not taken.
with_ancestors 🔒
pid and its parents, nearest first, as the process table records them (a parent that started after its child is a reused id and ends the chain).
with_plain_peer 🔒
Make the plain peer address (ConnectInfo<SocketAddr>, which the other routes read) available beside Conn.