Commit Graph

20 Commits

Author SHA1 Message Date
Quentin McGaw 4a78989d9d chore: do not use sentinel errors when unneeded
- main reason being it's a burden to always define sentinel errors at global scope, wrap them with `%w` instead of using a string directly
- only use sentinel errors when it has to be checked using `errors.Is`
- replace all usage of these sentinel errors in `fmt.Errorf` with direct strings that were in the sentinel error
- exclude the sentinel error definition requirement from .golangci.yml
- update unit tests to use ContainersError instead of ErrorIs so it stays as a "not a change detector test" without requiring a sentinel error
2026-05-02 03:29:46 +00:00
Quentin McGaw 93999062e4 hotfix(publicip): increase client timeouts from 5s to 15s 2026-03-10 12:26:40 +00: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 76a4bb5dc3 chore: use gofumpt for code formatting 2024-10-11 19:27:29 +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 09c47c740c fix(version): log last release by tag name alphabetically instead of date 2024-08-09 07:43:48 +00:00
Quentin McGaw 6826b05d58 chore(all): remove all package comments 2022-07-02 20:58:43 +00:00
Quentin McGaw 920ad8b54b chore(errors): review all errors in codebase 2022-02-20 02:58:16 +00:00
Quentin McGaw (desktop) f398af1169 Fix: check github http status code for version 2021-10-29 01:37:45 +00:00
Quentin McGaw (desktop) c39ff5c233 Maint: move duration formatting to qdm12/golibs 2021-07-23 19:17:23 +00:00
Quentin McGaw (desktop) 5b9887dade Maint: use qdm12/gosplash 2021-07-22 20:56:47 +00:00
Quentin McGaw (desktop) 876563c492 Maintenance: improve error wrapping 2021-05-30 16:14:08 +00:00
Quentin McGaw 7ca9d445f1 Maintenance: package comments 2021-02-06 16:26:23 +00:00
Quentin McGaw 8dd38fd182 Code maintenance: better JSON decoding for HTTP 2020-12-29 00:56:51 +00:00
Quentin McGaw 3b04677f8f HTTP control server /version endpoint 2020-11-04 14:07:04 +00:00
Quentin McGaw a6cb1a7052 Remove x/net Go dependency 2020-10-25 20:45:14 +00:00
Quentin McGaw 6f4be72785 Using context for HTTP requests 2020-10-17 21:54:09 +00:00
Quentin McGaw ec157f102b PIA nextgen portforward (#242)
* Split provider/pia.go in piav3.go and piav4.go
* Change port forwarding signature
* Enable port forwarding parameter for PIA v4
* Fix VPN gateway IP obtention
* Setup HTTP client for TLS with custom cert
* Error message for regions not supporting pf
2020-10-12 10:55:08 -04:00
Quentin McGaw 7c102c0028 Fix #135 2020-08-30 14:48:57 +00:00