2021-09-23 07:58:13 -07:00
|
|
|
package wevpn
|
|
|
|
|
|
|
|
|
|
import (
|
2022-01-06 06:40:23 -05:00
|
|
|
"github.com/qdm12/gluetun/internal/configuration/settings"
|
2021-09-23 07:58:13 -07:00
|
|
|
"github.com/qdm12/gluetun/internal/constants"
|
|
|
|
|
"github.com/qdm12/gluetun/internal/models"
|
|
|
|
|
"github.com/qdm12/gluetun/internal/provider/utils"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (w *Wevpn) BuildConf(connection models.Connection,
|
2022-04-25 07:57:45 +00:00
|
|
|
settings settings.OpenVPN) (lines []string) {
|
|
|
|
|
providerSettings := utils.OpenVPNProviderSettings{
|
|
|
|
|
RemoteCertTLS: true,
|
|
|
|
|
AuthUserPass: true,
|
|
|
|
|
Ciphers: []string{
|
|
|
|
|
constants.AES256gcm,
|
|
|
|
|
},
|
|
|
|
|
Auth: constants.SHA512,
|
|
|
|
|
Ping: 30, //nolint:gomnd
|
|
|
|
|
RenegDisabled: true,
|
|
|
|
|
CA: constants.WevpnCA,
|
|
|
|
|
Cert: constants.WevpnCert,
|
|
|
|
|
TLSCrypt: constants.WevpnTLSCrypt,
|
|
|
|
|
ExtraLines: []string{
|
|
|
|
|
"redirect-gateway def1 bypass-dhcp",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
return utils.OpenVPNConfig(providerSettings, connection, settings)
|
2021-09-23 07:58:13 -07:00
|
|
|
}
|