diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f124d6..92e7a82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ All notable changes to Veil. Dates are dd/mm/yyyy. +## Unreleased + +### Fixed + +- **Guests who reach the host over IPv6 can see each other.** Guests link to each other + through the host's own rendezvous, which listened on IPv4 only. A guest who reached the + host over IPv6 could reach the host but not the rendezvous, so other guests showed as + "Guest" and a key prefix, with no sound or video. The rendezvous now listens on the host's + public IPv6 address too, is named there in invites, and gets its own IPv6 pinhole when + port opening is on. +- The log says when each media link to another member comes up and how (direct, punched, + relayed), and once if it has not come up after 20 seconds, on both sides of the link. + ## 0.1.18, 05/12/2026 ### Changed diff --git a/crates/veil-app/src/engine/host.rs b/crates/veil-app/src/engine/host.rs index 04fffeb..4d44ae6 100644 --- a/crates/veil-app/src/engine/host.rs +++ b/crates/veil-app/src/engine/host.rs @@ -15,7 +15,9 @@ //! The call's socket is dual-stack where the system allows it. A public IPv6 address goes in //! every invite and to the rendezvous, guests dial it first, and, with port opening on, the //! router is asked for an IPv6 pinhole (`pinhole.rs`). If the public node has an IPv6 address -//! too, the IPv6 address is checked from outside as well. +//! too, the IPv6 address is checked from outside as well. The host's own rendezvous listens on +//! IPv6 too, at the same address, with a pinhole of its own: guests link to each other through +//! it, so a guest who reached the host over IPv6 must reach it the same way. //! //! The forwarder for calls above 4 people is `VEIL_FORWARDER` if set. Otherwise, when the //! host also runs its own rendezvous, it runs its own forwarder on a third port, reachable @@ -43,7 +45,7 @@ //! `MediaSession::apply` to its own task when calls grow. use std::collections::HashSet; -use std::net::{IpAddr, Ipv4Addr, SocketAddr}; +use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}; use std::sync::Arc; use std::time::Duration; @@ -127,9 +129,9 @@ pub async fn run( (Some(node), Some(_)) => node.resolve_ipv6().await, _ => None, }; - let rendezvous = match configured { - Some(addr) => addr, - None => own_server(lan, Own::Rendezvous, &identity, room_id, config.local_only)?, + let (rendezvous, rendezvous6) = match configured { + Some(addr) => (addr, None), + None => own_server(lan, Own::Rendezvous, &identity, room_id, config.local_only, v6)?, }; let forwarder = match ( resolve(config.forwarder.as_ref(), "forwarder") @@ -142,13 +144,9 @@ pub async fn run( configured, ) { (Some(addr), _) => Some(addr), - (None, None) => Some(own_server( - lan, - Own::Forwarder, - &identity, - room_id, - config.local_only, - )?), + (None, None) => Some( + own_server(lan, Own::Forwarder, &identity, room_id, config.local_only, None)?.0, + ), (None, Some(_)) => None, }; let started = if config.persistent { @@ -183,7 +181,7 @@ pub async fn run( let until_end = false; let mut relay = RelayAddrs::from(rendezvous); if configured.is_none() { - relay.addrs = hosted_addresses(rendezvous, None, config.local_only); + relay.addrs = hosted_addresses(rendezvous, None, rendezvous6, config.local_only); } let expires = new_invite( &host, @@ -225,6 +223,7 @@ pub async fn run( }; let ports = PortStatus::new(router.as_ref(), relay_router.as_ref()); let v6_port = V6Port::start(config.open_port, v6, port); + let relay_v6_port = V6Port::start(config.open_port, rendezvous6, rendezvous.addr.port()); // Only a public node can dial in from outside; the host's own rendezvous cannot. let mut reach = Reachability::default(); let mut checking = config @@ -270,6 +269,8 @@ pub async fn run( relay_router, ports, v6_port, + rendezvous6, + relay_v6_port, at6, reach, persistent, @@ -285,10 +286,12 @@ async fn publish_addresses(host: &HostHandle, addrs: &[SocketAddr]) { /// Where guests reach the host's own helper. In a Local only call it listens on every /// interface, so its local scope addresses are listed too (IPv6-only LANs need them). -/// Otherwise only the router's public mapping and the LAN address are given, as before. +/// Otherwise the router's public mapping, the public IPv6 address `v6` when the helper +/// listens there (at its own port), and the LAN address. fn hosted_addresses( node: NodeAddr, public: Option, + v6: Option, local_only: bool, ) -> Vec { let extra = if local_only { @@ -296,7 +299,13 @@ fn hosted_addresses( } else { Vec::new() }; - let mut addrs: Vec<_> = public.into_iter().chain([node.addr]).chain(extra).collect(); + let v6 = v6.map(|ip| SocketAddr::new(ip.into(), node.addr.port())); + let mut addrs: Vec<_> = public + .into_iter() + .chain(v6) + .chain([node.addr]) + .chain(extra) + .collect(); let mut seen = HashSet::new(); addrs.retain(|at| seen.insert(*at)); addrs.truncate(veil_call::relay_field::MAX_RELAY_ADDRS); @@ -352,22 +361,30 @@ enum Own { /// long as the call's runtime. /// Starts a rendezvous or forwarder for this call only: it serves `host`'s room `room_id` and /// refuses everyone else's, so strangers who find its port cannot use this upload. +/// Returns its node and, for a rendezvous given the host's public IPv6 address `v6`, that +/// address when it listens there too. fn own_server( lan: Option, kind: Own, host: &Identity, room_id: [u8; 16], local_only: bool, -) -> Result { + v6: Option, +) -> Result<(NodeAddr, Option), String> { let what = match kind { Own::Rendezvous => "rendezvous", Own::Forwarder => "forwarder", }; let identity = Identity::generate(); - // Outside Local only the helper stays IPv4, as before: dual stack would put it on the - // host's global IPv6 address, reachable from the whole internet. + // A rendezvous goes on the host's public IPv6 address too, where the call already is: + // guests who reached the host over IPv6 link to each other through it. It serves this + // room only, so being on the internet lends nothing to strangers. The forwarder stays + // IPv4: members reach it on the LAN, or not at all (`forwarder_check.rs`). + let dual = matches!(kind, Own::Rendezvous) && v6.is_some(); let node = if local_only { Node::bind_local(&identity, 0) + } else if dual { + Node::bind_any(&identity, 0) } else { Node::bind(&identity, SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0)) } @@ -385,6 +402,8 @@ fn own_server( key: node.id(), addr: local_addr, }; + // `bind_any` falls back to IPv4 where the system has no dual-stack socket. + let v6 = v6.filter(|_| dual && !local_only && node.ipv6()); match kind { Own::Rendezvous => drop(tokio::spawn( RendezvousServer::new(node) @@ -397,7 +416,7 @@ fn own_server( .run(), )), } - Ok(addr) + Ok((addr, v6)) } /// The link to show for `full`: a short one when that works as well, otherwise `full` itself. @@ -461,3 +480,24 @@ async fn until(at: u64) { tokio::time::sleep(Duration::from_secs(at - now)).await; } } + +#[cfg(test)] +#[allow(clippy::unwrap_used)] +mod tests { + use super::*; + + #[test] + fn the_rendezvous_is_listed_at_its_ipv6_address_too() { + let node = NodeAddr { + key: Identity::generate().public(), + addr: "192.168.1.20:7001".parse().unwrap(), + }; + let public: SocketAddr = "81.2.69.160:7001".parse().unwrap(); + let v6: Ipv6Addr = "2001:db8::20".parse().unwrap(); + let addrs = hosted_addresses(node, Some(public), Some(v6), false); + let at6: SocketAddr = "[2001:db8::20]:7001".parse().unwrap(); + assert_eq!(addrs, vec![public, at6, node.addr]); + // Without IPv6, as before. + assert_eq!(hosted_addresses(node, None, None, false), vec![node.addr]); + } +} diff --git a/crates/veil-app/src/engine/host/hosting.rs b/crates/veil-app/src/engine/host/hosting.rs index 0c920b4..79875f3 100644 --- a/crates/veil-app/src/engine/host/hosting.rs +++ b/crates/veil-app/src/engine/host/hosting.rs @@ -8,7 +8,7 @@ //! the leave dialog that fails leaves this device host and says so. use std::collections::HashMap; -use std::net::SocketAddr; +use std::net::{Ipv6Addr, SocketAddr}; use std::sync::Arc; use std::time::{Duration, Instant}; @@ -61,6 +61,10 @@ pub(in crate::engine) struct Hosting { pub relay_router: Option, pub ports: PortStatus, pub v6_port: Option, + /// The public IPv6 address the host's own rendezvous listens on, if it does. + pub rendezvous6: Option, + /// That rendezvous port's IPv6 pinhole, asked for with the call's. + pub relay_v6_port: Option, pub at6: Option, pub reach: Reachability, pub persistent: bool, @@ -333,7 +337,7 @@ impl Hosting { if let Some(addr) = public { crate::note!("rendezvous: guests on the internet reach it at {addr}"); } - self.relay.addrs = hosted_addresses(self.rendezvous, public, local_only); + self.relay.addrs = hosted_addresses(self.rendezvous, public, self.rendezvous6, local_only); let ports = self.ports.view(); self.shared.update(|view| view.router = ports); if self.ports.settled() { @@ -351,12 +355,20 @@ impl Hosting { self.shared.update(|view| view.reach = reach); } } + // Logged and renewed only: whether guests reach the call is checked above. + // shortcut: a refused rendezvous pinhole is logged, not shown in People as + // `RouterPort::GuestsApart` is for IPv4. Show it there if it proves common. + opened = next_v6(&mut self.relay_v6_port) => { + if !opened { + crate::note!("rendezvous: no IPv6 pinhole, so guests on IPv6 may not reach each other"); + } + } verdict = self.reach.next() => self.shared.update(|view| view.reach = verdict), } moderated::carry_out(&self.host, &mut self.session, &mut knocks).await; }; let close_v6 = async { - if let Some(v6_port) = self.v6_port { + for v6_port in [self.v6_port, self.relay_v6_port].into_iter().flatten() { v6_port.close().await; } }; diff --git a/crates/veil-app/src/engine/host/successor.rs b/crates/veil-app/src/engine/host/successor.rs index f4248de..2aa713a 100644 --- a/crates/veil-app/src/engine/host/successor.rs +++ b/crates/veil-app/src/engine/host/successor.rs @@ -14,7 +14,7 @@ //! until the call ends. They serve only this device's own room, and a later offer reuses them //! ([`Prepared::reseal`]). Stop them on a lost offer if people hand over often. -use std::net::SocketAddr; +use std::net::{Ipv6Addr, SocketAddr}; use std::sync::Arc; use tokio::sync::mpsc::Receiver; @@ -37,6 +37,7 @@ use crate::engine::view::Shared; pub(in crate::engine) struct Prepared { pub contact: Vec, rendezvous: NodeAddr, + rendezvous6: Option, configured: Option, forwarder: Option, relay: RelayAddrs, @@ -61,30 +62,27 @@ pub(in crate::engine) async fn prepare( veil_net::family::global_ipv6() }; let configured = resolve(config.rendezvous.as_ref(), "rendezvous").await?; - let rendezvous = match configured { - Some(addr) => addr, - None => own_server(lan, Own::Rendezvous, identity, room_id, config.local_only)?, + let (rendezvous, rendezvous6) = match configured { + Some(addr) => (addr, None), + None => own_server(lan, Own::Rendezvous, identity, room_id, config.local_only, v6)?, }; let forwarder = match (resolve(config.forwarder.as_ref(), "forwarder").await?, configured) { (Some(addr), _) => Some(addr), - (None, None) => Some(own_server( - lan, - Own::Forwarder, - identity, - room_id, - config.local_only, - )?), + (None, None) => Some( + own_server(lan, Own::Forwarder, identity, room_id, config.local_only, None)?.0, + ), (None, Some(_)) => None, }; let mut relay = RelayAddrs::from(rendezvous); if configured.is_none() { - relay.addrs = hosted_addresses(rendezvous, None, config.local_only); + relay.addrs = hosted_addresses(rendezvous, None, rendezvous6, config.local_only); } let addrs = advertised(config, v6, lan, port); let contact = seal(identity, room_id, epoch, &addrs, &relay)?; Ok(Prepared { contact, rendezvous, + rendezvous6, configured, forwarder, relay, @@ -145,6 +143,7 @@ pub(in crate::engine) async fn take_over( session.set_host(me); let Prepared { rendezvous, + rendezvous6, configured, forwarder, relay, @@ -166,6 +165,7 @@ pub(in crate::engine) async fn take_over( veil_net::family::global_ipv6() }; let v6_port = V6Port::start(config.open_port, v6, port); + let relay_v6_port = V6Port::start(config.open_port, rendezvous6, rendezvous.addr.port()); let mut reach = Reachability::default(); if let Some(at) = config.advertise.first() { check(&mut reach, &call, configured, *at); @@ -209,6 +209,8 @@ pub(in crate::engine) async fn take_over( relay_router, ports, v6_port, + rendezvous6, + relay_v6_port, at6: None, reach, persistent: true, @@ -234,6 +236,7 @@ mod tests { let mut prepared = Prepared { contact: seal(&me, room, 3, &addrs, &relay).unwrap(), rendezvous: node, + rendezvous6: None, configured: None, forwarder: None, relay: relay.clone(), diff --git a/crates/veil-app/src/engine/link_notes.rs b/crates/veil-app/src/engine/link_notes.rs new file mode 100644 index 0000000..256bf58 --- /dev/null +++ b/crates/veil-app/src/engine/link_notes.rs @@ -0,0 +1,164 @@ +//! Log lines for each member's media link: when it comes up, and once if it has not. +//! +//! Purpose: two guests who cannot link to each other see only "Guest" and a key prefix, and +//! the side that waits to be dialled logs nothing of its own (`MediaSession::apply` returns +//! failures to the dialling side only). [`LinkNotes`] gives both sides a line, so a log +//! shows which links came up, how, and which never did. +//! +//! Invariants: +//! - At most one "linked" and one "no link" line per member per epoch it joins, so a link that +//! never comes up cannot fill the log. Drops and redials are `session.rs`'s own lines. +//! - Holds device keys only, never names. + +use std::collections::{HashMap, HashSet}; +use std::time::{Duration, Instant}; + +use veil_call::Path; +use veil_security::PublicId; + +use super::short; + +/// How long a member may stay unlinked before the log says so. A hole punch takes a few +/// seconds, and the relay starts after it. +pub const NO_LINK_AFTER: Duration = Duration::from_secs(20); + +#[derive(Default)] +pub struct LinkNotes { + /// Members not linked yet, since when. + waiting: HashMap, + /// Waiting members already noted as unlinked. + noted: HashSet, + /// Members linked at least once. + linked: HashSet, +} + +impl LinkNotes { + /// A new epoch's other members. Newcomers start waiting; those who left are forgotten. + pub fn members(&mut self, others: &[PublicId], now: Instant) { + let current: HashSet = others.iter().copied().collect(); + self.waiting.retain(|d, _| current.contains(d)); + self.noted.retain(|d| current.contains(d)); + self.linked.retain(|d| current.contains(d)); + for device in others { + if !self.linked.contains(device) { + self.waiting.entry(*device).or_insert(now); + } + } + } + + /// The lines to log, given the links up now. Through a forwarder every member is reached + /// on its one link, which is keyed by the forwarder. + pub fn update(&mut self, paths: &HashMap, now: Instant) -> Vec { + let forwarded = paths + .values() + .any(|p| *p == Path::Forwarder) + .then_some(Path::Forwarder); + let mut lines = Vec::new(); + let mut waiting: Vec<(PublicId, Instant)> = + self.waiting.iter().map(|(d, at)| (*d, *at)).collect(); + // Key order, so the lines come out the same way each time. + waiting.sort_by_key(|(d, _)| d.0); + for (device, since) in waiting { + let waited = now.saturating_duration_since(since); + if let Some(path) = paths.get(&device).copied().or(forwarded) { + lines.push(format!( + "call: linked to {} ({}) after {waited:.1?}", + short(&device), + how(path) + )); + self.waiting.remove(&device); + self.noted.remove(&device); + self.linked.insert(device); + } else if waited >= NO_LINK_AFTER && self.noted.insert(device) { + lines.push(format!( + "call: no link to {} after {}s: neither a direct dial, a punch through \ + the rendezvous nor its relay worked", + short(&device), + waited.as_secs() + )); + } + } + lines + } +} + +fn how(path: Path) -> &'static str { + match path { + Path::Direct => "direct", + Path::Punched => "punched", + Path::Relayed => "relayed", + Path::Forwarder => "forwarder", + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn key(n: u8) -> PublicId { + PublicId([n; 32]) + } + + #[test] + fn a_link_is_noted_once_when_it_comes_up() { + let start = Instant::now(); + let mut notes = LinkNotes::default(); + notes.members(&[key(1)], start); + assert!(notes.update(&HashMap::new(), start).is_empty()); + let up = HashMap::from([(key(1), Path::Punched)]); + let lines = notes.update(&up, start + Duration::from_secs(3)); + assert_eq!(lines.len(), 1); + assert!(lines[0].contains("punched"), "{lines:?}"); + assert!(notes.update(&up, start + Duration::from_secs(4)).is_empty()); + // A later epoch with the same member does not note it again. + notes.members(&[key(1)], start + Duration::from_secs(5)); + assert!(notes.update(&up, start + Duration::from_secs(6)).is_empty()); + } + + #[test] + fn a_link_that_never_comes_up_is_noted_once() { + let start = Instant::now(); + let mut notes = LinkNotes::default(); + notes.members(&[key(1), key(2)], start); + let up = HashMap::from([(key(1), Path::Direct)]); + assert_eq!(notes.update(&up, start).len(), 1); + let late = start + NO_LINK_AFTER; + let lines = notes.update(&up, late); + assert_eq!(lines.len(), 1); + assert!(lines[0].starts_with("call: no link to"), "{lines:?}"); + assert!(notes.update(&up, late + Duration::from_secs(30)).is_empty()); + // Coming up later still says so. + let both = HashMap::from([(key(1), Path::Direct), (key(2), Path::Relayed)]); + let lines = notes.update(&both, late + Duration::from_secs(31)); + assert!( + lines.len() == 1 && lines[0].contains("relayed"), + "{lines:?}" + ); + } + + #[test] + fn a_forwarder_link_reaches_everyone() { + let start = Instant::now(); + let mut notes = LinkNotes::default(); + notes.members(&[key(1), key(2)], start); + let up = HashMap::from([(key(9), Path::Forwarder)]); + let lines = notes.update(&up, start + NO_LINK_AFTER); + assert!( + lines.len() == 2 && lines.iter().all(|l| l.contains("forwarder")), + "{lines:?}" + ); + } + + #[test] + fn someone_who_left_is_forgotten() { + let start = Instant::now(); + let mut notes = LinkNotes::default(); + notes.members(&[key(1)], start); + notes.members(&[], start); + assert!( + notes + .update(&HashMap::new(), start + NO_LINK_AFTER) + .is_empty() + ); + } +} diff --git a/crates/veil-app/src/engine/mod.rs b/crates/veil-app/src/engine/mod.rs index 8ed0dac..18b778f 100644 --- a/crates/veil-app/src/engine/mod.rs +++ b/crates/veil-app/src/engine/mod.rs @@ -30,6 +30,7 @@ mod guest; mod helper_evidence; mod host; mod invites; +mod link_notes; mod loopback; mod moderation; mod names; diff --git a/crates/veil-app/src/engine/session.rs b/crates/veil-app/src/engine/session.rs index b924f1a..217e8ef 100644 --- a/crates/veil-app/src/engine/session.rs +++ b/crates/veil-app/src/engine/session.rs @@ -40,6 +40,7 @@ use veil_security::{Identity, PublicId}; use super::audio_out::AudioIn; use super::auto_step::AutoStep; +use super::link_notes::LinkNotes; use super::names::{Announcer, Names}; use super::screen_proof; use super::sound_out::SoundOut; @@ -150,6 +151,7 @@ pub struct Session { subscribed: Option>, /// Turns link counters into the debug overlay's rates, once a second. sampler: Sampler, + link_notes: LinkNotes, /// Whether Auto data use should save data, judged from the same link rows. auto: AutoStep, /// Your microphone and your share's computer sound, each a stream of its own. @@ -197,6 +199,7 @@ impl Session { announcer: Announcer::new(your_name), subscribed: None, sampler: Sampler::default(), + link_notes: LinkNotes::default(), auto: AutoStep::default(), voice: SoundOut::voice(), share_sound: SoundOut::share(), @@ -250,6 +253,8 @@ impl Session { self.others.push((id, *device)); } } + let linking: Vec = self.others.iter().map(|(_, d)| *d).collect(); + self.link_notes.members(&linking, Instant::now()); let watching = !self.others.is_empty(); for control in self.pipes.controls() { control.watching.store(watching, Ordering::Relaxed); @@ -414,6 +419,9 @@ impl Session { fn refresh_paths(&mut self) { let paths: HashMap = self.media.paths().into_iter().collect(); + for line in self.link_notes.update(&paths, Instant::now()) { + crate::note!("{line}"); + } let linked: HashSet = paths.keys().copied().collect(); self.announcer.links(linked, Instant::now()); let by_id: HashMap = self diff --git a/docs/TRANSPARENCY.md b/docs/TRANSPARENCY.md index c4f941e..80d140a 100644 --- a/docs/TRANSPARENCY.md +++ b/docs/TRANSPARENCY.md @@ -102,8 +102,8 @@ see this: | Relay | Members' IP addresses, encrypted traffic volume and timing | | Forwarder | Members' device keys and the room hash (from the host's roster ticket), traffic volume and timing, and each video frame's layer marker: which resolution tier and frame-rate step it is, and whether it is a keyframe. Names and chat pass through it sealed: it sees when one is sent and how large it is, not who sent it or what it says | | Other members | Your device key, the display name you chose, your chat messages and reactions, and your IP addresses (IPv4 and, if you have one, your public IPv6 address) unless you use relay-only mode ("Hide my address" in Settings > Connection, off by default). It applies only when you join: a host's invite always carries the host's addresses, and the relay still sees yours. Chat and reactions are not stored: they are gone when the call ends. Members also learn who the host made a moderator and, only while someone moderates, the device keys (no names) of people waiting in the host's lobby, so moderators can admit or decline them. A person declined in that time has had their device key seen by the call's members | -| Your router | With "Open a port on my router" on, while you host: this computer's LAN address, the ports opened for the call, and that a program called "Veil" asked for them (section 3). With IPv6, also this computer's public IPv6 address, in a PCP request to let the call's port through the router's firewall | -| Anyone holding an invite link | The host's device key and the addresses in it: the host's LAN address and port, the router's public address and port when the router opened one, the host's public IPv6 address and port when it has one, and any public address set in `VEIL_ADVERTISE`. If the host runs its own rendezvous, also that rendezvous's LAN address and port, and its public port when the router opened one. The desktop app puts these in every invite so a guest can dial directly. Through the rendezvous they can also learn the host's public address, since joiners punch through to the host. They cannot learn any other member's address: a member accepts an introduction only from peers its current routes link to | +| Your router | With "Open a port on my router" on, while you host: this computer's LAN address, the ports opened for the call, and that a program called "Veil" asked for them (section 3). With IPv6, also this computer's public IPv6 address, in PCP requests to let the call's port through the router's firewall and, when Veil runs its own rendezvous, that rendezvous's port too | +| Anyone holding an invite link | The host's device key and the addresses in it: the host's LAN address and port, the router's public address and port when the router opened one, the host's public IPv6 address and port when it has one, and any public address set in `VEIL_ADVERTISE`. If the host runs its own rendezvous, also that rendezvous's LAN address and port, its public port when the router opened one, and the host's public IPv6 address with the rendezvous's port when the host has one (not in Local only). The desktop app puts these in every invite so a guest can dial directly. Through the rendezvous they can also learn the host's public address, since joiners punch through to the host. They cannot learn any other member's address: a member accepts an introduction only from peers its current routes link to | **Persistent calls (unreleased, ADR 0010).** Off unless the host switches on **Persistent call** before starting. In such a call: @@ -454,7 +454,11 @@ that allows only permanent UPnP mappings gets one, removed when the call ends; i crashes it stays until the router restarts or you remove the "Veil" entry. Veil talks only to your default gateway, or for UPnP to the device that answered from that address, and follows no redirect or proxy. With the port open, the router's public address goes first in your -invites, so anyone holding an invite learns it (section 2). To find the default gateway, +invites, so anyone holding an invite learns it (section 2). With a public IPv6 address (not in +Local only), Veil also asks the router by PCP for an IPv6 pinhole to let the call's port +through its firewall, and a second for the rendezvous's port when no rendezvous is set in +Settings. Each pinhole lasts as long as the call and is removed when it ends. Without port +opening on, the router's own firewall decides whether IPv6 guests get through. To find the default gateway, Veil reads `/proc/net/route` on Linux and runs `route print` on Windows or `route get` on macOS. The code is `crates/veil-portmap` and `crates/veil-app/src/engine/router.rs`.