- General improvements
- Parallel download of only needed files at start
- Prettier console output with all streams merged (openvpn, unbound, shadowsocks etc.)
- Simplified Docker final image
- Faster bootup
- DNS over TLS
- Finer grain blocking at DNS level: malicious, ads and surveillance
- Choose your DNS over TLS providers
- Ability to use multiple DNS over TLS providers for DNS split horizon
- Environment variables for DNS logging
- DNS block lists needed are downloaded and built automatically at start, in parallel
- PIA
- A random region is selected if the REGION parameter is left empty (thanks @rorph for your PR)
- Routing and iptables adjusted so it can work as a Kubernetes pod sidecar (thanks @rorph for your PR)
31 lines
810 B
Go
31 lines
810 B
Go
package settings
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/qdm12/private-internet-access-docker/internal/models"
|
|
"github.com/qdm12/private-internet-access-docker/internal/params"
|
|
)
|
|
|
|
// OpenVPN contains settings to configure the OpenVPN client
|
|
type OpenVPN struct {
|
|
NetworkProtocol models.NetworkProtocol
|
|
}
|
|
|
|
// GetOpenVPNSettings obtains the OpenVPN settings using the params functions
|
|
func GetOpenVPNSettings(params params.ParamsReader) (settings OpenVPN, err error) {
|
|
settings.NetworkProtocol, err = params.GetNetworkProtocol()
|
|
if err != nil {
|
|
return settings, err
|
|
}
|
|
return settings, nil
|
|
}
|
|
|
|
func (o *OpenVPN) String() string {
|
|
settingsList := []string{
|
|
"OpenVPN settings:",
|
|
"Network protocol: " + string(o.NetworkProtocol),
|
|
}
|
|
return strings.Join(settingsList, "\n|--")
|
|
}
|