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
|
10c199109a
|
Bump go to 1.24
|
2025-02-21 19:37:35 +01:00 |
|
dcarrillo
|
b5fe362183
|
Make geo database usage optional (#39)
|
2025-01-02 20:13:41 +01: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
|
e60d1ae5b7
|
Initial server handling refactor (#9)
|
2023-03-20 16:36:55 +01:00 |
|
dcarrillo
|
19c72f94a5
|
Add experimental support for HTTP/3 (#8)
* Wait for service in integration tests instead of watching for a string
* Add http3 experimental support
|
2023-03-18 21:06:51 +01:00 |
|
dcarrillo
|
eb200ddd81
|
Fix minor linting issues
|
2023-03-16 19:59:04 +01:00 |
|
dcarrillo
|
b61d64a755
|
Moving secure again, this time to github.com/gin-contrib/secure
|
2022-05-07 15:56:21 +02:00 |
|
dcarrillo
|
ca1d002974
|
Use gin-gonic/contrib/secure instead of deprecated module
|
2022-05-07 12:51:13 +02:00 |
|
dcarrillo
|
12da27ddab
|
Add optional secure headers to responses
|
2022-04-02 18:12:31 +02:00 |
|
dcarrillo
|
8b5cccd744
|
Refactor setting module and add tests (#4)
|
2021-11-29 18:16:27 +01:00 |
|
pando85
|
1aa59f1b0b
|
Fix long lines (#2)
Using [golines](https://github.com/segmentio/golines):
`golines -w .`
|
2021-11-18 19:26:53 +01:00 |
|
dcarrillo
|
2fcfa91545
|
first commit
|
2021-11-10 20:06:12 +01:00 |
|