feat(ipv6): IPv6-Support für HAProxy + Settings-Toggle
- setup.State.IPv6Enabled + Store.SetIPv6Enabled() - GET/POST /system/ipv6 im SystemHandler; HAProxy-Reload on save - HAProxy-Template: bind [::]:80, [::]:443, quic6@:443, [::]:3443 werden nur emittiert wenn IPv6Enabled=true - haproxy.View.IPv6Enabled aus SetupStore befüllt - Settings-UI: neues IPv6-Card (zwischen Auto-Update und Passwort) - i18n de+en ergänzt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,9 @@ defaults
|
||||
# Everything else redirects to HTTPS.
|
||||
frontend public_http
|
||||
bind :80
|
||||
{{- if .IPv6Enabled}}
|
||||
bind [::]:80
|
||||
{{- end}}
|
||||
|
||||
acl is_acme path_beg /.well-known/acme-challenge/
|
||||
|
||||
@@ -59,6 +62,10 @@ frontend public_https
|
||||
# gebaut; Browser fallen via Alt-Svc-Header (siehe unten) für
|
||||
# Folge-Requests auf h3 zurück.
|
||||
bind quic4@:443 ssl crt /etc/edgeguard/tls/ alpn h3
|
||||
{{- if .IPv6Enabled}}
|
||||
bind [::]:443 ssl crt /etc/edgeguard/tls/ alpn h2,http/1.1
|
||||
bind quic6@:443 ssl crt /etc/edgeguard/tls/ alpn h3
|
||||
{{- end}}
|
||||
|
||||
# Alt-Svc: signalisiert dass h3 auf demselben Port verfügbar ist.
|
||||
# ma=86400 = Browser darf den Hinweis 24h cachen.
|
||||
@@ -134,6 +141,9 @@ frontend public_https
|
||||
# (Hostname egal — default_backend), inkl. der direkten IP.
|
||||
frontend mgmt_https
|
||||
bind :3443 ssl crt /etc/edgeguard/tls/ alpn h2,http/1.1
|
||||
{{- if .IPv6Enabled}}
|
||||
bind [::]:3443 ssl crt /etc/edgeguard/tls/ alpn h2,http/1.1
|
||||
{{- end}}
|
||||
http-response set-header Strict-Transport-Security "max-age=31536000"
|
||||
http-request set-header X-Forwarded-Proto https
|
||||
http-request set-header X-Real-IP %[src]
|
||||
|
||||
@@ -128,6 +128,10 @@ type View struct {
|
||||
// OS-Upgrades / Wartungsfenster.
|
||||
GlobalMaintenance bool
|
||||
GlobalMaintenanceMessage string
|
||||
|
||||
// IPv6Enabled: wenn true fügt das Template zusätzliche
|
||||
// bind-Direktiven für [::]:80, [::]:443 und [::]:3443 hinzu.
|
||||
IPv6Enabled bool
|
||||
}
|
||||
|
||||
type DomainView struct {
|
||||
@@ -270,6 +274,7 @@ func (g *Generator) loadView(ctx context.Context) (*View, error) {
|
||||
if v.GlobalMaintenanceMessage == "" && v.GlobalMaintenance {
|
||||
v.GlobalMaintenanceMessage = "EdgeGuard maintenance in progress."
|
||||
}
|
||||
v.IPv6Enabled = st.IPv6Enabled
|
||||
}
|
||||
}
|
||||
return v, nil
|
||||
|
||||
Reference in New Issue
Block a user