Expand description
Which address to reach a server at. Port of @redseat/api-http direct.ts and of
the candidate order of the web app’s direct-access.ts.
Direct HTTPS to a Redseat server is https://<ip-encoded>.<label>.<zone>:<port>: the
zone’s DNS decodes the IP from the first label, and the server holds a wildcard
certificate for *.<label>.<zone>, so every address gets a valid TLS name.
Structs§
- Direct
Candidate - A base URL to try.
- Probe
Options - Probe timing.
Enums§
- Candidate
Kind - Where a candidate address comes from.
Functions§
- direct_
candidates - Candidates in preference order: LAN, then global IPv6, then public IPv4. Addresses that are not IPs and duplicates are skipped.
- direct_
hostname <ip-encoded>.<label>.<zone>.- direct_
url https://<ip-encoded>.<label>.<zone>[:port].- domain_
candidate - A server’s custom domain, served over HTTPS by its own reverse proxy.
- encode_
ip_ label 192.168.1.10→192-168-1-10;2a01:e0a::1→2a01-e0a--1.Nonewhenaddressis not an IP address.- probe_
candidates_ with - Pings every candidate at once with
ping(true: it answered). A success wins as soon as every more preferred candidate (earlier in the list) has failed, or afterpreference_windowotherwise; the best success so far is used.Nonewhen none answers beforetimeout. Port ofprobeDirectCandidates. - public_
direct_ url - URL for links meant to leave this device (share, a player on another machine): a public address, never a LAN one. IPv4 first, since recipients may lack IPv6.
- public_
server_ url - Public URL of a server: its public direct address, else its custom domain.
- server_
candidates - Every address of a server, best first: direct HTTPS candidates, then the custom
domain. A
preferredURL (the last one that worked, cached by the app) goes first.