Expand description
Which addresses a page in the server’s Chromium may connect to. The browser opens pages from the web on a
machine that holds the user’s workspace, so everything it connects to goes through address_proxy, which asks
this module about each address it is about to connect to, after it has resolved the name itself. Plain data and
functions, so every rule is tested without a network.
Refused: this server’s own listening ports on the loopback address, every private, link-local (the cloud metadata addresses among them), shared, documentation, multicast and reserved range, IPv6 forms that embed an IPv4 address (translated, 6to4, Teredo), and port 0. Allowed: the public internet, and other ports on the loopback address (a development server the user runs in the same workspace).
Constants§
- DENY_
PORTS_ ENV - Other loopback ports the person who runs this server wants kept from pages (a gateway or another service in the same network namespace), as a comma-separated list. Read by the server’s own process: a page, or an agent, cannot set it.
Statics§
- OWN_
PORTS 🔒 - The ports this server listens on, noted as each listener binds. A page may never connect to one of them, whatever address it names for this machine.
Functions§
- check
- Whether a page may connect to
iponport; the reason in words when it may not.own_portsare this server’s own listening ports. - note_
own_ port - Note a port this server listens on.
- note_
ports_ from_ env - Note the ports
DENY_PORTS_ENVnames. - own_
ports - The ports noted so far.
- parse_
ports - The ports in a comma-separated list; anything that is not a port number is skipped.
- plain 🔒
- The address with an IPv4 address written as IPv6 (
::ffff:a00:1) read as the IPv4 one it is. - v4_
refused 🔒 - v6_
refused 🔒