Skip to content

fix(macos): strip IPv6 PublishPort lines before writing launchd plist#249

Merged
geodro merged 1 commit intomainfrom
fix/macos-ipv6-port-bind
Apr 23, 2026
Merged

fix(macos): strip IPv6 PublishPort lines before writing launchd plist#249
geodro merged 1 commit intomainfrom
fix/macos-ipv6-port-bind

Conversation

@geodro
Copy link
Copy Markdown
Owner

@geodro geodro commented Apr 23, 2026

gvproxy cannot bind two specific host IPs (127.0.0.1 and [::1]) on the same port simultaneously — it tries to bind 0.0.0.0:port internally and fails with listen tcp4 :PORT: bind: address already in use, leaving containers in Created state instead of running.

PairIPv6Binds (called in WriteQuadletDiff) adds [::1]:PORT:PORT lines alongside every 127.0.0.1:PORT:PORT line. On Linux these are passed to systemd/quadlet which handles them correctly. On macOS, WriteContainerUnit converts them to podman run -p flags, and gvproxy chokes on the dual binding.

The fix strips bracketed IPv6 PublishPort= lines in WriteContainerUnit so only IPv4 bindings reach podman run on macOS.

gvproxy cannot bind two specific host IPs (127.0.0.1 and ::1) on the
same port simultaneously — it tries to bind 0.0.0.0:port internally
and fails with 'address already in use', leaving containers in Created
state instead of running.

Strip bracketed IPv6 PublishPort= lines in WriteContainerUnit so only
IPv4 bindings reach podman run on macOS.
@geodro geodro merged commit 22e3c4d into main Apr 23, 2026
3 checks passed
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.

1 participant