dcarrillo
|
2e32a20f60
|
refactor: dependency injection instead of package globals (#57)
* refactor: export Settings type, Setup returns value
* refactor: resolver.Setup takes explicit Settings struct
* refactor: GetHeadersWithoutTrustedHeaders takes explicit header params
* refactor: server constructors take narrow config
* refactor: Router struct with handler methods, remove geoSvc global
* refactor: wire DI through main, remove setting.App references
* refactor: remove App global, use returned Settings
* refactor: update router tests for DI
* chore: fix lint issues — rename ServerTimeouts to Timeouts, fix shadowed variables
|
2026-07-21 18:37:21 +02:00 |
|
dcarrillo
|
49ffcadb0a
|
Fix data races, nil-record panics, scanner SSRF, log date layout, shutdown timeouts, and enable stricter linters (#54)
High (behavioral bugs):
- service.Geo: add RLock on lookups, handle Reload error, keep old DBs on failure
- models.GeoDB.Reload: open new DBs before closing old ones (no reader gap)
- router: guard nil geo records (404 instead of 500) in geo.go, generic.go, dns.go
- router/port_scanner: reject undetermined client IPs (nil->localhost dial)
- internal/httputils: fix access log date layout (02/Jan/2006, not literal Nov)
- server/quic: log.Printf instead of log.Fatal in request handler
Medium:
- server/*: 10s shutdown timeout; SIGTERM drains servers before closing geo DBs
- httputils: Clone() request headers instead of mutating the live map; strings.Builder
- setting/app: handle all os.Stat errors; fix "truster" typos; use errors.New;
remove dead Token field
- cmd: errors.Is for sentinel checks; os.Stderr; log.Fatal instead of panic;
pass http.Handler by value (not pointer-to-interface)
- resolver: validate config at startup (pre-parse RRs, validate IPs); check WriteMsg
errors; Setup returns error
Low:
- .golangci.yaml: enable errcheck, govet, errorlint; fix all resulting findings
- server/tls: explicit TLSConfig{MinVersion: tls.VersionTLS12}
- router/dns: label-exact vhost suffix check, strip port; template.Must
- models: errors.Join instead of %s on []error
- service/geo_test: race-regression test (concurrent lookups during Reload)
- README: Go >= 1.25; fix latent test bug (store.Add->Set in dns_test.go)
|
2026-07-19 12:09:52 +02:00 |
|
dcarrillo
|
e8d3a20781
|
New feature: prometheus metrics endpoint (#46)
|
2025-11-03 18:36:13 +01:00 |
|
dcarrillo
|
b5fe362183
|
Make geo database usage optional (#39)
|
2025-01-02 20:13:41 +01:00 |
|
dcarrillo
|
4492f77d87
|
Remove docker compose from integration tests because of the testcontainers dependency nightmare (#34)
* Remove docker compose from integration tests because of the testcontainers dependency nightmare
|
2024-06-01 19:12:14 +02:00 |
|
dcarrillo
|
c37642c6c1
|
Revert "Update dependencies"
This reverts commit f3a6f27e99.
|
2024-05-25 16:10:48 +02:00 |
|
dcarrillo
|
f3a6f27e99
|
Update dependencies
|
2024-05-25 16:07:52 +02:00 |
|
dcarrillo
|
d13ea29071
|
New whatismydns feature (#29)
|
2024-04-12 19:26:48 +02:00 |
|
dcarrillo
|
454f65f087
|
Move models initial setup to server handler (not ideal)
|
2024-03-23 20:24:19 +01:00 |
|
dcarrillo
|
0c14419e7e
|
Server handling refactor (#27)
|
2024-03-23 17:41:34 +01:00 |
|
dcarrillo
|
0b31633309
|
Remove useless function
|
2023-03-21 20:19:11 +01:00 |
|
dcarrillo
|
b5fa3be506
|
Move logs about stopping servers to the proper place
|
2023-03-20 19:27:17 +01:00 |
|
dcarrillo
|
8783db018b
|
Use pointers to proper server initializing handling
|
2023-03-20 17:43:06 +01:00 |
|
dcarrillo
|
e60d1ae5b7
|
Initial server handling refactor (#9)
|
2023-03-20 16:36:55 +01:00 |
|