feat(protonvpn): support up to 5 forwarded ports (#3208)

This commit is contained in:
Quentin McGaw
2026-04-18 02:36:06 +02:00
committed by GitHub
parent 7e7e8182ef
commit d5eeec6fb3
17 changed files with 254 additions and 109 deletions
+5 -1
View File
@@ -69,7 +69,11 @@ func (s *Service) SetPortsForwarded(ctx context.Context, ports []uint16) (err er
return fmt.Errorf("cleaning up: %w", err)
}
err = s.onNewPorts(ctx, ports)
internalToExternalPorts := make(map[uint16]uint16, len(ports))
for _, port := range ports {
internalToExternalPorts[port] = port
}
err = s.onNewPorts(ctx, internalToExternalPorts)
if err != nil {
return fmt.Errorf("handling new ports: %w", err)
}