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
88fd9388e4
chore(lint): remove canonicalheader since it's not reliable
2024-11-05 13:35:58 +00:00
Quentin McGaw
69aafa53c9
fix(server/auth): fix wiki link to authentication section
2024-11-05 13:35:58 +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
a2e76e1683
feat(server): role based authentication system ( #2434 )
...
- Parse toml configuration file, see https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md#authentication
- Retro-compatible with existing AND documented routes, until after v3.41 release
- Log a warning if an unprotected-by-default route is accessed unprotected
- Authentication methods: none, apikey, basic
- `genkey` command to generate API keys
Co-authored-by: Joe Jose <45399349+joejose97@users.noreply.github.com >
2024-09-18 13:29:36 +02:00
Quentin McGaw
ff7cadb43b
chore(server): move log middleware to internal/server/middlewares/log
2024-08-23 13:46:52 +00:00
Quentin McGaw
4d60b71583
feat(dns): replace unbound with qdm12/dns@v2.0.0-beta-rc6 ( #1742 )
...
- Faster start up
- Clearer error messages
- Allow for more Gluetun-specific customization
- DNSSEC validation is dropped for now (it's sort of unneeded)
- Fix #137
2024-08-21 14:35:41 +02:00
Quentin McGaw
897a9d7f57
feat(config): allow invalid server filters ( #2419 )
...
- Disallow setting a server filter when there is no choice available
- Allow setting an invalid server filter when there is at least one choice available
- Log at warn level when an invalid server filter is set
- Fix #2337
2024-08-17 12:01:26 +02:00
Quentin McGaw
8c730a6e4a
chore(port-forward): support multiple port forwarded
2024-07-29 13:55:28 +00:00
Quentin McGaw
bf4cc0dabf
fix(server): /openvpn route status get and put
...
- get status return stopped if running wireguard
- put status changes vpn type if running wireguard
2024-04-08 07:28:56 +00:00
Quentin McGaw
c0621bf381
chore(lint): upgrade linter to v1.56.2
2024-03-21 17:02:11 +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
f70f0aca9c
fix(settings): validate Wireguard addresses depending on IPv6 support
2022-12-14 11:52:03 +00:00
Quentin McGaw
0bb320065e
feat(server): patch VPN settings
...
- `PUT` at `/v1/vpn/settings`
- Undocumented, experimental for now
2022-08-21 23:36:48 +00:00
Quentin McGaw
d685d78e74
feat(server): add vpn route to replace /openvpn
2022-08-21 23:29:25 +00:00
Quentin McGaw
48896176e5
chore(server): do not redact openvpn credentials from response
2022-08-21 22:04:04 +00:00
Quentin McGaw
54dcf28b31
chore(server): replace 404 with 401 for unsupported routes and methods
2022-08-21 22:02:06 +00:00
Quentin McGaw
1ab74e6bb3
chore: OpenVPN user and password as nullable
...
- Username and password can be the empty string for custom provider
2022-08-13 18:01:26 +00:00
Quentin McGaw
6826b05d58
chore(all): remove all package comments
2022-07-02 20:58:43 +00:00
Quentin McGaw
037f19e852
hotfix(publicip): revert back JSON to public_ip
2022-06-26 18:08:11 +00:00
Quentin McGaw
89277828ac
chore(publicip): internal/publicip/ipinfo package
2022-06-12 01:11:22 +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
292813831d
chore(updater): internal/updater/loop subpackage
...
- Do not export updater interface
- Export updater struct
- Define local interfaces where needed
- More restrictive updater loop interface in http control server
- Inject `Updater` into updater loop as an interface
2022-05-28 16:03:59 +00:00
Quentin McGaw
84607e332b
chore(server): use httpserver package for control server
2022-03-30 09:00:42 +00:00
Quentin McGaw
836f021a87
chore(lint): add containedctx, decorder and errchkjson
2022-02-26 13:49:53 +00:00
Quentin McGaw (desktop)
cf95692b93
Maint: package local narrow Logger interfaces
2021-09-23 17:06:09 +00:00
Quentin McGaw (desktop)
f9cb71027c
Feat: location data at /v1/publicip/ip
2021-09-05 22:54:10 +00:00
Quentin McGaw (desktop)
5c2286f4e8
Maint: simplify settings code in internal/vpn
2021-08-19 14:57:11 +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)
cc2235653a
Maint: refactor VPN configuration structure
...
- Paves the way for Wireguard
- VPN struct contains Type, Openvpn and Provider configurations
- OpenVPN specific options (e.g. client key) moved from Provider to Openvpn configuration struct
- Move Provider configuration from OpenVPN configuration to VPN
- HTTP control server returns only openvpn settings (not provider settings)
2021-08-17 15:44:11 +00:00
Quentin McGaw (desktop)
abbcf60aed
Fix: port forward get route, fixes #552
2021-08-01 15:01:28 +00:00
Quentin McGaw
2998cf5e48
Maint: port forwarding refactoring ( #543 )
...
- portforward package
- portforward run loop
- Less functional arguments and cycles
2021-07-28 08:35:44 -07:00
Quentin McGaw (desktop)
3c44214d01
Maint: pass only single strings to logger methods
...
- Do not assume formatting from logger's interface
- Allow to change golibs in the future to accept only strings for logger methods
2021-07-23 17:36:08 +00:00
Quentin McGaw (desktop)
39068dda17
Maint: rework Openvpn run loop
2021-07-16 21:20:34 +00:00
Quentin McGaw (desktop)
ac3ff095a1
Maint: rework DNS run loop
...
- Fix fragile user triggered logic
- Simplify state
- Lock loop when crashed
2021-07-16 19:00:56 +00:00
Quentin McGaw (desktop)
0ed738cd61
Maint: make all set status context aware
2021-07-16 00:49:59 +00:00
Quentin McGaw (desktop)
bb2b8b4514
Fix: events routing exit when gluetun stops at start
2021-07-15 22:42:58 +00:00
Quentin McGaw (desktop)
876563c492
Maintenance: improve error wrapping
2021-05-30 16:14:08 +00:00
Quentin McGaw
7d6763cde7
Maintenance: upgrade golibs (affects logger)
2021-05-14 14:07:16 +00:00
Quentin McGaw
cff5e693d2
Maintenance: shutdown order
...
- 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
2021-05-11 22:24:32 +00:00
Quentin McGaw
c54ee71e1d
Maintenance: new logging, shorter with less deps
2021-02-25 23:51:29 +00:00
Quentin McGaw
43e140e6cc
Fix linting errors
2021-02-06 17:16:58 +00:00
Quentin McGaw
7ca9d445f1
Maintenance: package comments
2021-02-06 16:26:23 +00:00
Quentin McGaw
b1ff95affa
Maintenance: Fix exit race condition
2021-01-26 01:04:15 +00:00
Quentin McGaw
8428714cf5
Code maintenance: upgrade golangci-lint to 1.34.1
2020-12-29 17:50:12 +00:00
Quentin McGaw
8dd38fd182
Code maintenance: better JSON decoding for HTTP
2020-12-29 00:56:51 +00:00
Quentin McGaw
82a02287ac
Public IP endpoint with GET /ip fixing #319
2020-12-27 21:06:00 +00:00