Skip to content

Conversation

@kvinwang
Copy link
Collaborator

@kvinwang kvinwang commented Jan 30, 2026

No description provided.

@kvinwang kvinwang marked this pull request as draft January 30, 2026 06:46
@kvinwang kvinwang changed the title feat(gateway): expose yamux config and add reconnecting pool feat(gateway): Multiplexing with yamux Jan 30, 2026
Allow listen_port to accept either a single port (8443) or a range
string ("8443-8543") to bind multiple TCP listeners, avoiding
ephemeral port exhaustion under high connection counts.
Remove the single-port field from HostInfo proto since listen_port is
now a range. Use {e:#} for connection error logs for cleaner output.
Use separate --tcp-ports/--udp-ports arguments per port spec instead
of comma-joining them, which could exceed passt's argument parser limit
with large port ranges.
Add 'info' subcommand showing detailed VM information including
instance ID, app URL, boot progress, and recent events. Also show
instance_id column in verbose lsvm output.
Introduce dstack-port-forward crate with TCP (splice zero-copy with
fallback) and UDP forwarding. Integrate ForwardService into VMM to
dynamically manage port forwarding rules when bridge-mode guests
report their eth0 IP via the network.eth0 vsock event.

Key changes:
- New port-forward crate with ForwardService for dynamic rule add/remove
- Guest reports eth0 IP in dstack-prepare.sh via dstack-util notify-host
- VMM persists guest IP to disk and hot-reloads forwarding rules
- On VMM restart, forwarding is restored from persisted guest IPs
- guest-agent now includes eth0 interfaces in network info API
Replace guest-side IP reporting with a DHCP server-side ReportDhcpLease
PRPC endpoint. The VMM resolves MAC→VM via deterministic MAC derivation
and reconfigures port forwarding on lease events.

Refactor Networking from a tagged enum to a flat struct with a
NetworkingMode enum, so shared fields (bridge name, mac_prefix) are
accessible regardless of mode. Add mac_prefix config (0-3 hex bytes)
for deterministic MAC generation, now applied to all networking modes.
…firewall rules

Add dhcp-notify.sh script integration, nftables firewall rules for
standalone bridges, and setup-bridge.sh improvements.
When `update_vm` is called with `update_ports=true`, also call
`reconfigure_port_forward` so running bridge-mode VMs get their
forwarding rules updated without requiring a restart.
@kvinwang kvinwang closed this Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants