Commit Graph

103 Commits

Author SHA1 Message Date
Quentin McGaw 628b0a22e2 hotfix(pia): fix servers data updater and update servers data
- use v7 API endpoint to get correct list of servers
- skip offline regions
- do not skip *.pvt.site
2026-04-22 12:34:56 +00:00
Quentin McGaw ea3d138bd6 fix(pia): ignore *.pvt.site regions 2026-04-22 00:49:47 +00:00
Quentin McGaw c3a6809447 fix(pia): try x.y.128.1 and x.y.0.1 from the gateway IP to find the API IP address 2026-04-22 00:42:23 +00:00
Quentin McGaw 17a7bf6d54 fix(privateinternetaccess): use AES-GCM for all presets 2026-04-19 18:00:56 +00:00
Quentin McGaw b11de4f0c3 fix(privateinternetaccess): remove none encryption preset 2026-04-19 17:51:20 +00:00
Quentin McGaw d5eeec6fb3 feat(protonvpn): support up to 5 forwarded ports (#3208) 2026-04-18 02:36:06 +02:00
Quentin McGaw d586793169 fix(all): increase global http client timeout to 35s and precise lower timeouts where needed
- Fix DNS blocklists slow downloads, fix #3102
- Leave 35s timeout for updaters
- Set timeouts to 1s for local calls
- Set timeouts to 5s for LAN VPN calls and small external calls
- Set timeouts to 10s external VPN API calls
2026-02-20 16:40:51 +00:00
Quentin McGaw 7052d5490b hotfix(pia): revert port changes
- This reverts commit fd6e5e4e90.
- Port changes are more involved and require cipher, auth and certificate changes as well
2025-12-23 14:02:47 +00:00
Quentin McGaw cc89b35b63 chore(pia): add test to ensure default ports are within ports from their API 2025-12-22 23:24:13 +00:00
Quentin McGaw fd6e5e4e90 fix(pia): update default openvpn ports and possible ports to choose
- Fix #3046
2025-12-22 22:47:17 +00:00
Quentin McGaw b0c4a28be6 chore(lint): upgrade linter to v2.4.0
- migrate configuration file
- fix existing code issues
- add exclusion rules
- update linter names
2025-08-16 20:10:19 +00:00
Quentin McGaw 3473fe9c15 fix(openvpn): set default mssfix to 1320 for all providers with no default
- Partially address #2533
2024-11-05 13:35:54 +00:00
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 4851bd70da chore(deps): remove qdm12/golibs dependency
- Implement friendly duration formatting locally
2024-08-21 13:27:30 +00:00
Quentin McGaw c39edb6378 fix(pia): support port forwarding using Wireguard (#2420)
- Build API IP address using the first 2 bytes of the gateway IP and adding `128.1` to it
- API IP address is valid for both OpenVPN and Wireguard
- Fix #2320
2024-08-19 03:19:16 +02:00
Quentin McGaw 9233f3f5ba feat(pia/updater): use v6 API to get servers data 2024-08-16 12:40:22 +00:00
Quentin McGaw 8c730a6e4a chore(port-forward): support multiple port forwarded 2024-07-29 13:55:28 +00:00
Quentin McGaw 264480b659 hotfix(pia): remove crl verify
- Refers to issue #2376
2024-07-29 08:23:39 +00:00
Quentin McGaw 0501743814 feat(pia): port forwarding options VPN_PORT_FORWARDING_USERNAME and VPN_PORT_FORWARDING_PASSWORD
- Retro-compatible with `OPENVPN_USER` + `OPENVPN_PASSWORD`
- No more reading for the OpenVPN auth file
- Allow to use PIA port forwarding with Wireguard
2024-07-09 14:44:46 +00:00
Quentin McGaw 7872ab91dc chore(pia): return an error to pf loop if server cannot port forward 2024-05-18 12:00:57 +00:00
Quentin McGaw 6dd27e53d4 chore(portforward): remove PIA dependency on storage package 2024-05-02 09:18:35 +00:00
Quentin McGaw 5467652b8b chore(openvpn): support multiple CAs in generated config 2023-12-19 18:21:03 +00:00
Quentin McGaw 0406de399d chore(portforward): move vpn gateway obtention within port forwarding service 2023-09-23 12:03:06 +00:00
Quentin McGaw 8ad16cdc12 feat(protonvpn): port forwarding support with NAT-PMP (#1543)
Co-authored-by: Nicholas Xavier <nicho@nicho.dev>
2023-06-30 20:09:44 +02:00
Quentin McGaw 0a29337c3b chore(all): replace net.IP with netip.Addr 2023-05-20 20:06:12 +00:00
Quentin McGaw 723d0f5e12 chore(lint): upgrade from v1.51.2 to v1.52.2 2023-04-12 09:40:00 +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 1d1657e9be fix(pia): remove username+password from login bad http status code 2022-10-31 11:00:43 +00:00
Quentin McGaw 7fdc7de210 feat(ipv6): use ipv6 endpoint IPs if supported 2022-09-12 21:31:37 +00:00
Quentin McGaw 5ddd703f6a feat(vpn): auto detection of IPv6 support
- `OPENVPN_IPV6` removed
- Affects OpenVPN
- Use the same mechanism for OpenVPN and Wireguard
- Check only once at program start since this is unlikely to change at runtime
- Log if IPv6 is supported
- Remove `IPv6` boolean from settings structs
- Move IPv6 detection as a method on NetLinker
2022-09-06 12:16:29 +00:00
Stijn Hoop 532df9f8d4 fix(privateinternetaccess): get token for port forwarding (#1132) 2022-09-05 08:01:48 -07:00
Quentin McGaw 5914cb0e37 chore(build): bump Go from 1.17 to 1.18
- Unneeded disabled linters are: `rowserrcheck`, `sqlclosecheck`
- Disabled linter is `wastedassign` which is tolerable
2022-08-24 21:54:08 +00:00
Quentin McGaw 6826b05d58 chore(all): remove all package comments 2022-07-02 20:58:43 +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 ebd94723c1 chore(updater): incorporate FetchServers method in Provider interface
- Each provider interface can now fetch updated servers data
- Rename each provider updater subpackage name to `updater`
- Updater constructor does not take a settings struct
- Updater update method takes in a slice of provider strings
2022-06-09 23:47:41 +00:00
Quentin McGaw 7f32b43895 fix(pia): load custom PIA certificate for API 2022-06-09 17:11:24 +00:00
Quentin McGaw e37f557cd5 chore(provider): add Name() method per provider 2022-06-09 17:11:24 +00:00
Quentin McGaw 79f213d97a chore(updater): rename GetServers to FetchServers 2022-06-09 17:11:24 +00:00
Quentin McGaw 46e6bd16c9 fix(pia): remove duplicate log of pf data expiration 2022-06-09 16:34:28 +00:00
Quentin McGaw 1216326867 chore(storage): common sorting for all servers 2022-06-06 02:24:54 +00:00
Quentin McGaw 36b504609b chore(all): memory and thread safe storage
- settings: get filter choices from storage for settings validation
- updater: update servers to the storage
- storage: minimal deep copying and data duplication
- storage: add merged servers mutex for thread safety
- connection: filter servers in storage
- formatter: format servers to Markdown in storage
- PIA: get server by name from storage directly
- Updater: get servers count from storage directly
- Updater: equality check done in storage, fix #882
2022-06-05 15:19:16 +00:00
Quentin McGaw 22455ac76f chore(updater): shared not enough servers error 2022-05-28 22:02:18 +00:00
Quentin McGaw 90c6c8485b chore(updater): common GetServers signature
- Log warnings when running outside of CLI mode
- Remove updater CLI bool setting
- Warnings are logged in updating functions
2022-05-28 20:58:50 +00:00
Quentin McGaw 991d75a1d0 chore(provider): rename all BuildConf to OpenVPNConfig 2022-05-27 22:04:14 +00:00
Quentin McGaw a91eb95456 chore(internal/provider): rename all structs to Provider 2022-05-27 18:05:04 +00:00
Quentin McGaw 42904b6749 chore(all): move sub-packages to internal/provider 2022-05-27 17:48:51 +00:00
Quentin McGaw 4bcd8ee9f5 chore(constants): add internal/constants/openvpn package 2022-05-27 16:29:49 +00:00
Quentin McGaw 306de8feda chore(constants): add internal/provider/privateinternetacess/presets package 2022-05-27 16:29:48 +00:00