Commit Graph

17 Commits

Author SHA1 Message Date
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 00749ae529 Add tests for new disable-scan flag 2025-09-26 16:07:05 +02:00
AdamB 9b87d28433 Add a flag to disable TCP scanning (#45)
* Add a flag to disable TCP scanning

* Move the option definition
2025-09-26 15:59:39 +02:00
dcarrillo b5fe362183 Make geo database usage optional (#39) 2025-01-02 20:13:41 +01:00
dcarrillo b57beded8f chore: Fix typo 2024-05-09 20:01:40 +02:00
dcarrillo d13ea29071 New whatismydns feature (#29) 2024-04-12 19:26:48 +02: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 1ee7256506 Remove headers set by a trusted proxy from outputs 2022-05-02 18:07:40 +02:00
dcarrillo 7c70abf07f Add feature to get the right client port when using a trusted proxy 2022-05-02 17:56:57 +02:00
dcarrillo 12da27ddab Add optional secure headers to responses 2022-04-02 18:12:31 +02:00
dcarrillo 2d330a99b7 Add CI and go-report badges. Add comments to make golint happy 2021-11-30 17:49:02 +01: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 255660374f Update README.md 2021-11-11 18:30:50 +01:00
dcarrillo 2fcfa91545 first commit 2021-11-10 20:06:12 +01:00