mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-07 04:20:12 +02:00
hotfix(pia): revert port changes
- This reverts commit fd6e5e4e90.
- Port changes are more involved and require cipher, auth and certificate changes as well
This commit is contained in:
@@ -3,17 +3,24 @@ package privateinternetaccess
|
||||
import (
|
||||
"github.com/qdm12/gluetun/internal/configuration/settings"
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
"github.com/qdm12/gluetun/internal/provider/privateinternetaccess/presets"
|
||||
"github.com/qdm12/gluetun/internal/provider/utils"
|
||||
)
|
||||
|
||||
func (p *Provider) GetConnection(selection settings.ServerSelection, ipv6Supported bool) (
|
||||
connection models.Connection, err error,
|
||||
) {
|
||||
defaults := getConnectionDefaults()
|
||||
// Set port defaults depending on encryption preset.
|
||||
var defaults utils.ConnectionDefaults
|
||||
switch *selection.OpenVPN.PIAEncPreset {
|
||||
case presets.None, presets.Normal:
|
||||
defaults.OpenVPNTCPPort = 502
|
||||
defaults.OpenVPNUDPPort = 1198
|
||||
case presets.Strong:
|
||||
defaults.OpenVPNTCPPort = 501
|
||||
defaults.OpenVPNUDPPort = 1197
|
||||
}
|
||||
|
||||
return utils.GetConnection(p.Name(),
|
||||
p.storage, selection, defaults, ipv6Supported, p.randSource)
|
||||
}
|
||||
|
||||
func getConnectionDefaults() utils.ConnectionDefaults {
|
||||
return utils.NewConnectionDefaults(8443, 8080, 0) //nolint:mnd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user