Add optional IPv6 GUA dual-stack support via IP6_SUBNET#405
Closed
ohshitgorillas wants to merge 1 commit intolinuxserver:masterfrom
Closed
Add optional IPv6 GUA dual-stack support via IP6_SUBNET#405ohshitgorillas wants to merge 1 commit intolinuxserver:masterfrom
ohshitgorillas wants to merge 1 commit intolinuxserver:masterfrom
Conversation
Introduce the IP6_SUBNET environment variable for native IPv6 global
unicast address support on WireGuard tunnels. When set the server
receives ::1/128 and peers are assigned sequential ::2/128, ::3/128,
etc. addresses alongside their existing IPv4 addresses. The feature
is entirely opt-in; omitting IP6_SUBNET preserves current behaviour
with zero changes to generated configs.
Changes
-------
* root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run
- Validate IP6_SUBNET: strip optional CIDR prefix, enforce prefix
length >= /64, require trailing colon, reject non-hex characters.
- Set IP6_ADDR_SERVER for the server template.
- Extract CLIENT_IP6 from existing peer confs (cut -d, -f2 on the
Address field); invalidate on subnet change for reassignment.
- IPv6 conflict-detection loop mirrors the existing IPv4 logic.
- Include CLIENT_IP6 in server-conf AllowedIPs for each peer.
- Persist ORIG_IP6_SUBNET in save_vars; add IP6_SUBNET to the
change-detection condition that triggers conf regeneration.
- Backward-compat sed patches upgrade existing user templates that
predate this change (mirrors the earlier PresharedKey migration).
* root/defaults/server.conf
- Address line conditionally appends ,<IP6_ADDR_SERVER> when set.
* root/defaults/peer.conf
- Address line conditionally appends ,<CLIENT_IP6> when set.
* readme-vars.yml
- Add IP6_SUBNET to opt_param_env_vars with full description.
- List IP6_SUBNET among vars that trigger conf regeneration.
- New "IPv6 GUA Support" section: requirements (SYS_MODULE,
router routes), complete host-mode and bridge-mode docker-compose
examples, and explicit notes on ephemeral host routes.
https://claude.ai/code/session_01QdSdYNzFJjZVymw6NNbGP5
There was a problem hiding this comment.
Thanks for opening this pull request! Be sure to follow the pull request template!
Contributor
|
I am a bot, here is the pushed image/manifest for this PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce the IP6_SUBNET environment variable for native IPv6 global unicast address support on WireGuard tunnels. When set the server receives ::1/128 and peers are assigned sequential ::2/128, ::3/128, etc. addresses alongside their existing IPv4 addresses. The feature is entirely opt-in; omitting IP6_SUBNET preserves current behaviour with zero changes to generated configs.
Changes
root/etc/s6-overlay/s6-rc.d/init-wireguard-confs/run
root/defaults/server.conf
root/defaults/peer.conf
readme-vars.yml
https://claude.ai/code/session_01QdSdYNzFJjZVymw6NNbGP5
Description:
Benefits of this PR and context:
How Has This Been Tested?
Source / References: