Quentin McGaw
76a4bb5dc3
chore: use gofumpt for code formatting
2024-10-11 19:27:29 +00:00
Quentin McGaw
abe9dcbe33
chore(lint): add new linters and update codebase
...
- add canonicalheader
- add copyloopvar
- add fatcontext
- add intrange
2024-10-11 18:28:00 +00:00
Quentin McGaw
3c8e80a1a4
chore(lint): upgrade linter from v1.56.2 to v1.61.0
...
- Remove no longer needed exclude rules
- Add new exclude rules for printf govet errors
- Remove deprecated linters `execinquery` and `exportloopref`
- Rename linter `goerr113` to `err113`
- Rename linter `gomnd` to `mnd`
2024-10-11 18:05:54 +00:00
Quentin McGaw
a2b3d7e30c
chore(deps): implement github.com/qdm12/golibs/command locally ( #2418 )
2024-08-21 15:21:31 +02:00
Quentin McGaw
dea4080a7b
fix(custom-openvpn): remove comments before parsing file
2024-08-03 13:37:57 +00:00
Quentin McGaw
45fe38e670
fix(custom): parse port option line for OpenVPN
2024-04-30 08:02:28 +00:00
Quentin McGaw
32d6453918
fix(custom): default TCP port for any tcp proto
2023-11-28 07:51:29 +00:00
Quentin McGaw
c326b616b4
feat(custom): support tcp-client proto for OpenVPN
2023-11-28 07:48:55 +00:00
Quentin McGaw
ff9b56d6d8
docs(all): update to use newer wiki repository
...
- Update URLs logged by program
- Update README.md links
- Update contributing guide link
- Update issue templates links
- Replace Wiki issue template by link to Gluetun Wiki repository issue creation
- Set program announcement about Github wiki new location
2023-06-30 10:31:26 +00:00
Quentin McGaw
37f0e5c73b
chore(lint): add linters dupword, paralleltest and gocheckcompilerdirectives
2023-06-08 07:40:37 +00:00
Quentin McGaw
3b807e2ca9
feat(openvpn): add support for openvpn 2.6
2023-05-21 13:23:51 +00:00
Quentin McGaw
e8f2296a0d
change(openvpn): Openvpn 2.4 no longer supported
2023-05-21 13:20:02 +00:00
Quentin McGaw
0a29337c3b
chore(all): replace net.IP with netip.Addr
2023-05-20 20:06:12 +00:00
Quentin McGaw
1693c59e0d
chore(lint): fix issues
...
- sources/env: remove unused `envToInt`
- fix `ireturn` error for `newCipherDESCBCBlock`
2023-04-22 11:02:53 +00:00
Quentin McGaw
3b86927ca7
fix(vpnsecure): upgrade Openvpn key encryption if needed ( #1471 )
2023-04-03 03:40:09 -07:00
Quentin McGaw
c7a841f4b4
chore(openvpn/extract): simplify PEM extract
2023-04-01 16:57:18 +00:00
Quentin McGaw
4ba159e483
chore(all): review error wrappings
...
- remove repetitive `cannot` and `failed` prefixes
- rename `unmarshaling` to `decoding`
2023-04-01 16:57:18 +00:00
Quentin McGaw
7421dcb45f
feat(openvpn): explain ip route error in logs
...
- `RTNETLINK answers: File exists` changed to warning with explanation
- `Linux route add command failed:` changed to warning with explanation
2022-11-11 09:48:55 +00:00
Quentin McGaw
c954e6f231
fix: parse udp4, udp6, tcp4 or tcp6
2022-10-16 16:54:12 +00:00
Quentin McGaw
8dfaebc737
chore(all): remove deprecated io/ioutil import
2022-08-24 21:43:37 +00:00
Quentin McGaw
a182e3503b
feat: add VPNsecure.me support ( #848 )
...
- `OPENVPN_ENCRYPTED_KEY` environment variable
- `OPENVPN_ENCRYPTED_KEY_SECRETFILE` environment variable
- `OPENVPN_KEY_PASSPHRASE` environment variable
- `OPENVPN_KEY_PASSPHRASE_SECRETFILE` environment variable
- `PREMIUM_ONLY` environment variable
- OpenVPN user and password not required for vpnsecure provider
2022-08-15 16:54:58 -07:00
Quentin McGaw
535297dcf5
chore: extract.PEM replaces PEM parse functions
2022-06-24 23:10:00 +00:00
Quentin McGaw
578ef768ab
chore(all): return concrete types, accept interfaces
...
- Remove exported interfaces unused locally
- Define interfaces to accept arguments
- Return concrete types, not interfaces
2022-06-11 01:34:30 +00:00
Quentin McGaw
4bcd8ee9f5
chore(constants): add internal/constants/openvpn package
2022-05-27 16:29:49 +00:00
Quentin McGaw
920ad8b54b
chore(errors): review all errors in codebase
2022-02-20 02:58:16 +00:00
Quentin McGaw
0e6db2f1c5
chore(env): SERVER_REGIONS variable
...
- With retro-compatibility with `REGION`
2022-02-06 19:59:07 +00:00
Quentin McGaw
c73369e11c
chore(constants): remove and move constant paths
...
- Remove unused paths
- Move paths to inline constants if used only once
2022-02-06 19:59:07 +00:00
Quentin McGaw
7d824a5179
chore(settings): refactor settings processing ( #756 )
...
- Better settings tree structure logged using `qdm12/gotree`
- Read settings from environment variables, then files, then secret files
- Settings methods to default them, merge them and override them
- `DNS_PLAINTEXT_ADDRESS` default changed to `127.0.0.1` to use DoT. Warning added if set to something else.
- `HTTPPROXY_LISTENING_ADDRESS` instead of `HTTPPROXY_PORT` (with retro-compatibility)
2022-01-06 06:40:23 -05:00
Quentin McGaw
82c0f523aa
fix: openvpn at /usr/sbin/openvpn2.5
...
- Fix operation on QNAP devices
- Refer to #157
2021-11-12 22:48:19 +00:00
Quentin McGaw
e0e3ca3832
Feat: Perfect privacy support ( #606 )
2021-10-05 10:44:15 -07:00
Quentin McGaw (desktop)
18a4a79763
Fix: log errors as error for OpenVPN
2021-09-28 11:57:32 +00:00
Quentin McGaw (desktop)
79f243e98d
Maint: package local log levels
2021-09-23 17:06:09 +00:00
Quentin McGaw (desktop)
cf95692b93
Maint: package local narrow Logger interfaces
2021-09-23 17:06:09 +00:00
Quentin McGaw
f807f756eb
VPNSP value custom for OpenVPN custom config files (#621 )
...
- Retro-compatibility: `OPENVPN_CUSTOM_CONFIG` set implies `VPNSP=custom`
- Change: `up` and `down` options are not filtered out
- Change: `OPENVPN_INTERFACE` overrides the network interface defined in the configuration file
- Change: `PORT` overrides any port found in the configuration file
- Feat: config file is read when building the OpenVPN configuration, so it's effectively reloaded on VPN restarts
- Feat: extract values from custom file at start to log out valid settings
- Maint: `internal/openvpn/extract` package instead of `internal/openvpn/custom` package
- Maint: All providers' `BuildConf` method return an error
- Maint: rename `CustomConfig` to `ConfFile` in Settings structures
2021-09-13 08:30:14 -07:00
Quentin McGaw (desktop)
65ace12def
Maint: internal/openvpn/parse package
...
- Parse PEM key data for Cyberghost and VPNUnlimited
- Add more unit tests
2021-09-08 16:40:19 +00:00
Quentin McGaw (desktop)
8d258feff7
Hot fix: interface name set for openvpn configs
2021-08-20 01:13:04 +00:00
Quentin McGaw (desktop)
bec8ff27ae
Feat: OPENVPN_INTERFACE defaulting to tun0
...
- Fix: custom config with custom network interface name for firewall
- Keep VPN tunnel interface in firewall state
- Vul fix: only allow traffic through vpn interface when needed
- Adapt code to adapt to network interface name
- Remove outdated TUN and TAP constants
2021-08-19 23:22:55 +00:00
Quentin McGaw (desktop)
9218c7ef19
Maint: create OpenVPN runner in VPN run loop
2021-08-19 14:45:57 +00:00
Quentin McGaw (desktop)
3d8e61900b
Maint: make VPN connection not specific to OpenVPN
...
- Add VPN field to ServerSelection struct
- Set VPN type to server selection at start using VPN_TYPE
- Change OpenVPNConnection to Connection with Type field
- Rename Provider GetOpenVPNConnection to GetConnection
- Rename GetTargetIPOpenVPNConnection to GetTargetIPConnection
- Rename PickRandomOpenVPNConnection to PickRandomConnection
- Add 'OpenVPN' prefix to OpenVPN specific methods on connection
2021-08-19 14:09:41 +00:00
Quentin McGaw (desktop)
105d81c018
Maint: move Openvpn package files
...
- Move internal/openvpn/config/*.go to internal/openvpn/
- Move internal/openvpn/setup.go to internal/vpn/openvpn.go
2021-08-19 13:31:12 +00:00
Quentin McGaw (desktop)
d4ca5cf257
Maint: internal/vpn package for vpn loop
2021-08-18 22:01:04 +00:00
Quentin McGaw (desktop)
05018ec971
Maint: use VPN settings instead of OpenVPN in loop
2021-08-18 21:27:09 +00:00
Quentin McGaw (desktop)
0027a76c49
Maint: move OpenVPN streams processing to config package
2021-08-18 21:16:28 +00:00
Quentin McGaw (desktop)
a0cb6fabfd
Maint: rename openvpn command.go to start.go
2021-08-18 20:47:03 +00:00
Quentin McGaw (desktop)
9e5400f52d
Maint: split out OpenVPN version functions to openvpn/config/version.go
2021-08-18 20:46:20 +00:00
Quentin McGaw (desktop)
7a1d0ff3ec
Maint: internal/openvpn setup.go file
2021-08-18 20:43:47 +00:00
Quentin McGaw (desktop)
d9fbecaa01
Maint: minor changes to openvpn/config package
...
- Constructor returns concrete struct instead of interface
- Rename conf to openvpnConf in openvpn loop
2021-08-18 20:28:42 +00:00
Quentin McGaw (desktop)
ecdf9396a5
Maint: move OpenVPN configurator to openvpn/config
2021-08-18 20:23:50 +00:00
Quentin McGaw (desktop)
df51aa40f4
Maint: split custom config files in openvpn/custom
2021-08-18 20:18:49 +00:00
Quentin McGaw (desktop)
996942af47
Maint: move custom config files to custom package
2021-08-18 20:14:02 +00:00