2021-05-11 17:10:51 +00:00
|
|
|
package fastestvpn
|
|
|
|
|
|
|
|
|
|
import (
|
2022-01-06 06:40:23 -05:00
|
|
|
"github.com/qdm12/gluetun/internal/configuration/settings"
|
2021-05-11 17:10:51 +00:00
|
|
|
"github.com/qdm12/gluetun/internal/constants"
|
|
|
|
|
"github.com/qdm12/gluetun/internal/models"
|
|
|
|
|
"github.com/qdm12/gluetun/internal/provider/utils"
|
|
|
|
|
)
|
|
|
|
|
|
2021-08-19 14:09:41 +00:00
|
|
|
func (f *Fastestvpn) BuildConf(connection models.Connection,
|
2022-04-25 07:57:45 +00:00
|
|
|
settings settings.OpenVPN) (lines []string) {
|
|
|
|
|
//nolint:gomnd
|
|
|
|
|
providerSettings := utils.OpenVPNProviderSettings{
|
|
|
|
|
AuthUserPass: true,
|
|
|
|
|
Ciphers: []string{
|
|
|
|
|
constants.AES256cbc,
|
|
|
|
|
},
|
|
|
|
|
MssFix: 1450,
|
|
|
|
|
TLSCipher: "TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA", //nolint:lll
|
|
|
|
|
AuthToken: true,
|
|
|
|
|
KeyDirection: "1",
|
|
|
|
|
RenegDisabled: true,
|
|
|
|
|
CA: constants.FastestvpnCA,
|
|
|
|
|
TLSAuth: constants.FastestvpnTLSAuth,
|
|
|
|
|
UDPLines: []string{
|
|
|
|
|
"tun-mtu 1500",
|
|
|
|
|
"tun-mtu-extra 32",
|
|
|
|
|
"ping 15",
|
|
|
|
|
},
|
|
|
|
|
ExtraLines: []string{
|
|
|
|
|
"comp-lzo",
|
|
|
|
|
},
|
2021-05-11 17:10:51 +00:00
|
|
|
}
|
2022-04-25 07:57:45 +00:00
|
|
|
return utils.OpenVPNConfig(providerSettings, connection, settings)
|
2021-05-11 17:10:51 +00:00
|
|
|
}
|