Merge pull request #11432 from HynoR/fix/firewall

feat: Add UDP port 443 accept rule to Pre-firewall config
This commit is contained in:
wanghe
2025-12-22 19:14:21 +08:00
committed by GitHub
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -711,6 +711,9 @@ func (u *FirewallService) addPortsBeforeStart(client firewall.FirewallClient) er
if err := client.Port(fireClient.FireInfo{Port: "443", Protocol: "tcp", Strategy: "accept"}, "add"); err != nil {
return err
}
if err := client.Port(fireClient.FireInfo{Port: "443", Protocol: "udp", Strategy: "accept"}, "add"); err != nil {
return err
}
return client.Reload()
}
+3
View File
@@ -363,6 +363,9 @@ func initPreRules() error {
return err
}
}
if err := iptables.AddRule(iptables.FilterTab, iptables.Chain1PanelBasicAfter, fmt.Sprintf("-p udp -m udp --dport 443 -j ACCEPT")); err != nil {
return err
}
if err := iptables.AddRule(iptables.FilterTab, iptables.Chain1PanelBasicAfter, iptables.DropAllTcp); err != nil {
return err
}