mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-08-07 04:13:12 +00:00
* additive quic transport, off by default (--quic-support) * add QuicConf + QuicConfBuilder, --quic-support / --quic-port flags * net_config announces quic-v1 host/ext/dns4 addrs, adds quic-v1 to enr multiaddrs * newWakuSwitch mounts quic transport when a quic addr is set * toRemotePeerInfo: quic from enr multiaddrs ext, sorted quic-first * BoundPorts.quic, read back the bound quic port at start (handles --quic-port=0) * skip auto quic addr when operator supplies one via --ext-multiaddr * tests: nodes dual-stack by default, tcp-only where single transport asserted * tests: drop hardcoded ephemeral ports (port 0) to fix quic-churn bind flakes * use setupNat to discover NAT-mapped UDP port when QUIC enabled
27 lines
558 B
Nim
27 lines
558 B
Nim
{.push raises: [].}
|
|
|
|
import std/json
|
|
|
|
type BoundPorts* {.requiresInit.} = object
|
|
## Set by the factory once each service has bound to a port.
|
|
## A value of 0 means the service was not enabled or did not bind.
|
|
tcp*: uint16
|
|
webSocket*: uint16
|
|
quic*: uint16
|
|
rest*: uint16
|
|
discv5Udp*: uint16
|
|
metrics*: uint16
|
|
|
|
proc init*(T: type BoundPorts): BoundPorts =
|
|
return BoundPorts(
|
|
tcp: 0'u16,
|
|
webSocket: 0'u16,
|
|
quic: 0'u16,
|
|
rest: 0'u16,
|
|
discv5Udp: 0'u16,
|
|
metrics: 0'u16,
|
|
)
|
|
|
|
proc `$`*(p: BoundPorts): string =
|
|
return $(%*p)
|