Feat: pull filter ipv6 if OPENVPN_IPV6 is off
This commit is contained in:
@@ -68,6 +68,13 @@ func (c *Cyberghost) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "mssfix "+strconv.Itoa(int(settings.MSSFix)))
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.CyberghostCertificate)...)
|
||||
lines = append(lines, utils.WrapOpenvpnCert(
|
||||
|
||||
@@ -62,6 +62,13 @@ func (f *Fastestvpn) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "user "+username)
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.FastestvpnCertificate)...)
|
||||
lines = append(lines, utils.WrapOpenvpnTLSAuth(
|
||||
|
||||
@@ -59,6 +59,13 @@ func (h *HideMyAss) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "user "+username)
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.HideMyAssCA)...)
|
||||
lines = append(lines, utils.WrapOpenvpnCert(
|
||||
|
||||
@@ -57,6 +57,13 @@ func (i *Ipvanish) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "user "+username)
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(constants.IpvanishCA)...)
|
||||
|
||||
lines = append(lines, "")
|
||||
|
||||
@@ -63,6 +63,13 @@ func (i *Ivpn) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "user "+username)
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.IvpnCA)...)
|
||||
lines = append(lines, utils.WrapOpenvpnTLSAuth(
|
||||
|
||||
@@ -71,6 +71,13 @@ func (m *Mullvad) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "mssfix "+strconv.Itoa(int(settings.MSSFix)))
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.MullvadCertificate)...)
|
||||
|
||||
|
||||
@@ -67,6 +67,13 @@ func (n *Nordvpn) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "user "+username)
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.NordvpnCertificate)...)
|
||||
lines = append(lines, utils.WrapOpenvpnTLSAuth(
|
||||
|
||||
@@ -58,6 +58,13 @@ func (p *Privado) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "mssfix "+strconv.Itoa(int(settings.MSSFix)))
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.PrivadoCertificate)...)
|
||||
|
||||
|
||||
@@ -81,6 +81,13 @@ func (p *PIA) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "mssfix "+strconv.Itoa(int(settings.MSSFix)))
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(certificate)...)
|
||||
lines = append(lines, utils.WrapOpenvpnCRLVerify(X509CRL)...)
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ func (p *Privatevpn) BuildConf(connection models.OpenVPNConnection,
|
||||
|
||||
// Privatevpn specific
|
||||
"comp-lzo",
|
||||
"tun-ipv6",
|
||||
|
||||
// Added constant values
|
||||
"auth-nocache",
|
||||
@@ -60,6 +59,13 @@ func (p *Privatevpn) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "mssfix "+strconv.Itoa(int(settings.MSSFix)))
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.PrivatevpnCertificate)...)
|
||||
lines = append(lines, utils.WrapOpenvpnTLSCrypt(
|
||||
|
||||
@@ -66,6 +66,13 @@ func (p *Protonvpn) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "user "+username)
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.ProtonvpnCertificate)...)
|
||||
lines = append(lines, utils.WrapOpenvpnTLSAuth(
|
||||
|
||||
@@ -66,6 +66,13 @@ func (p *Purevpn) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "user "+username)
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.PurevpnCertificateAuthority)...)
|
||||
lines = append(lines, utils.WrapOpenvpnCert(
|
||||
|
||||
@@ -64,6 +64,13 @@ func (s *Surfshark) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "user "+username)
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.SurfsharkCertificate)...)
|
||||
lines = append(lines, utils.WrapOpenvpnTLSAuth(
|
||||
|
||||
@@ -70,6 +70,13 @@ func (t *Torguard) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "fast-io")
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.TorguardCertificate)...)
|
||||
lines = append(lines, utils.WrapOpenvpnTLSAuth(
|
||||
|
||||
@@ -35,7 +35,6 @@ func (p *Provider) BuildConf(connection models.OpenVPNConnection,
|
||||
|
||||
// Modified variables
|
||||
"verb " + strconv.Itoa(settings.Verbosity),
|
||||
// "auth-user-pass " + constants.OpenVPNAuthConf,
|
||||
connection.ProtoLine(),
|
||||
connection.RemoteLine(),
|
||||
}
|
||||
@@ -56,6 +55,13 @@ func (p *Provider) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "user "+username)
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.VPNUnlimitedCertificateAuthority)...)
|
||||
lines = append(lines, utils.WrapOpenvpnCert(
|
||||
|
||||
@@ -67,6 +67,13 @@ func (w *Windscribe) BuildConf(connection models.OpenVPNConnection,
|
||||
lines = append(lines, "mssfix "+strconv.Itoa(int(settings.MSSFix)))
|
||||
}
|
||||
|
||||
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
|
||||
lines = append(lines, "tun-ipv6")
|
||||
} else {
|
||||
lines = append(lines, `pull-filter ignore "route-ipv6"`)
|
||||
lines = append(lines, `pull-filter ignore "ifconfig-ipv6"`)
|
||||
}
|
||||
|
||||
lines = append(lines, utils.WrapOpenvpnCA(
|
||||
constants.WindscribeCertificate)...)
|
||||
lines = append(lines, utils.WrapOpenvpnTLSAuth(
|
||||
|
||||
Reference in New Issue
Block a user