v3.18.0

passteque/gluetunv3.18.0May 31, 2021by qdm12

AI Summary

Introduces IVPN support, OpenVPN version selection, and enhanced server filtering capabilities.

Key Highlights

  • IVPN support
  • OPENVPN_VERSION environment variable
  • Enhanced server filtering
  • Multiple IP addresses per server

Breaking Changes

  • Shadowsocks password is now compulsory
  • Do not exit program on an OpenVPN configuration error

New Features

  • IVPN support
  • OPENVPN_VERSION which can be `2.4` or `2.5`
  • Filter servers by SERVER_HOSTNAME, COUNTRY, REGION, CITY
  • Multiple IP addresses for each server
  • Support `none` encryption preset for Private Internet Access
  • Log Alpine version at start

Full Release Notes

## Features

- IVPN support
- `OPENVPN_VERSION` which can be `2.4` or `2.5` to choose your OpenVPN program version at runtime
- Filter Cyberghost servers by `SERVER_HOSTNAME`
- Filter Mullvad servers by `SERVER_HOSTNAME`
- Filter NordVPN servers by `SERVER_HOSTNAME` and/or `SERVER_NAME`
- Filter Privado servers by `COUNTRY`, `REGION` and/or `CITY`
- Filter Private Internet Access servers by `SERVER_HOSTNAME` and/or `SERVER_NAME`
- Filter ProtonVPN servers with `FREE_ONLY`
- Filter PureVPN servers by `SERVER_HOSTNAME`
- Filter Surfshark servers by `SERVER_HOSTNAME`
- Multiple IP addresses for each:
    - Torguard server
    - Windscribe server
    - Private Internet Access server
- All hardcoded server information updated
- Support `none` encryption preset for Private Internet Access
- Log Alpine version at start
- `NET_ADMIN` tip logged when a routing permission error occurs
- Create `/gluetun` if it does not exist

## Bug fixes

- ProtonVPN `SERVER_NAME` environmnent variable reading
- Fix Mullvad servers filtering (see #444)
- Record TCP and UDP support for each PureVPN server
- Only teardown routing configuration if changes to routing occurred
- Fix VyprVPN port
- Fix missing OpenVPN `auth` overrides
- Only set OpenVPN `fast-io` option when using UDP
- Upgrade dependencies to fix dependency vulnerabilities
    - `golang.org/x/sys` to current version
    - `github.com/qdm12/dns` from `v1.4.0` to `v1.7.0`
    - `github.com/qdm12/ss-server` from `v0.1.0` to `v0.2.0`
- Fix rebinding protection for IPv6 mapped IPv4 networks
    - Use `netaddr` package for DNS blacklisting
- Log custom port only if set (for Private Internet Access and Windscribe)
- Change log level for OpenVPN TLS error from debug to warn
- Servers listen on all IP interfaces with `:<port>`, not just IPv4 with `0.0.0.0:<port>`
- HideMyAss hostname choices
- HideMyAss OpenVPN configuration `remote hostname port` line

## Changes

- Do not exit program on an OpenVPN configuration error
- Keep firewall enabled on shutdown to avoid leaks
- Shadowsocks password is now compulsory

## Documentation

- Issue template warnings about answering all questions

## Maintenance

- Refactor `internal/updater` package
    - Require at least 80% of current number of servers to update server information
    - Each provider is in its own package with a common structure
    - `internal/updater/unzip` package with `Unzipper` interface
    - `internal/updater/openvpn` package with extraction and download functions
- Improve `internal/storage` package:
    - Add missing server merging logic
    - `logTimeDiff` shared function
- Add unset `SERVER_NAME` in Dockerfile
- Improve `internal/publicip` package:
    - Exported `Result` struct
    - Parallelize IP information fetch
- Snyk code security analysis for Go code and Docker image
- Common server not found error builder
- Improve `internal/updater/providers/torguard`
    - Fallback on IP from configuration file if DNS resolution fails
    - Download both TCP and UDP zip files to detect support for each
- Filter Torguard servers by protocol (although all support TCP and UDP, so not a feature really)
- Improve `internal/updater/providers/vyprvpn`
    - Extract from each server configuration if the server supports TCP and/or UDP (never TCP for now)
- Filter VyprVPN servers by protocol (although all support only TCP for now, so not a feature really)
- `internal/updater/providers/pia`: re-fetch PIA API to obtain more server information
- `internal/routing`: improve error wrapping
- Network protocol as boolean in code to avoid possible coding errors
- `internal/provider`: split each provider in its own package
- `internal/alpine`: improve error wrapping
- `cmd/gluetun/main.go`:
    - Shutdown order, added in `internal/shutdown` package
        - Order of threads to shutdown (control then tickers then health etc.)
        - Rely on closing channels instead of waitgroups
        - Move exit logs from each package to the shutdown package
    - Use Go 1.16's `signal.NotifyContext`
    - Improve `printVersion` function
        - Print program versions in order given
        - Exit program on any error as each program is required
- Generate OpenVPN configuration valid for OpenVPN `2.4` or `2.5` depending on the current version
- `Dockerfile`:
    - Remove outdated comments
    - Remove unused openvpn installed shell script and library files
- Use `io` instead of `ioutil` whenever possible
- Upgrade qdm12/golibs (affects logger)
- Upgrade golangci-lint to `v1.40.1`
    - Add more linters to `.golangci.yml`
- Dependabot
    - Bump actions/checkout from 2 to 2.3.4 (#453)