Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1edb530
Fix DNS server concurrency bug and add TCP support
jbarwick Feb 7, 2026
2846822
Fix concurrent query blocking and IPv6 resolver support
jbarwick Feb 7, 2026
1d5bb69
Use net.JoinHostPort for bindAddr to support IPv6 listen addresses
jbarwick Feb 7, 2026
cc609f8
Fix data race: move len(internalRecords) inside RLock section
jbarwick Feb 7, 2026
646f811
Fix data race: use atomic.Bool for serverRunning flag
jbarwick Feb 7, 2026
a6ab3ed
Add shebang and set -euo pipefail to build.sh
jbarwick Feb 7, 2026
434e76d
Add cross-platform support to dns_deep_test.sh
jbarwick Feb 7, 2026
b01e72d
Forward TCP queries via TCP and retry truncated UDP responses over TCP
jbarwick Feb 7, 2026
9f4e508
Fix silent request drops, test script lockups, and false test failures
jbarwick Feb 7, 2026
a5982af
feat: device discovery foundation — data model, record store, and 30 …
jbarwick Feb 8, 2026
f3421c0
docs: add parental controls design considerations to device store (#1)
jbarwick Feb 8, 2026
feb1353
feat: wire device store into DNS handler with passive discovery (#1)
jbarwick Feb 8, 2026
5c5c986
Phase 3: mDNS/Bonjour browser + multi-zone DNS support
jbarwick Feb 8, 2026
83c091e
Phase 4: RFC 2136 Dynamic DNS UPDATE handler
jbarwick Feb 8, 2026
5e17065
feat: configurable base path, Docker deployment, admin port consolida…
jbarwick Feb 8, 2026
947d206
feat: Phase 6 — Devices page, API endpoints, dev tooling fixes
jbarwick Feb 9, 2026
0bb711a
Merge feature/dns-env-config-and-testing into release
jbarwick Feb 9, 2026
852abb2
Merge feature/1-device-discovery into release
jbarwick Feb 9, 2026
3224cff
feat: add Docker Hub publish script and repository README
jbarwick Feb 9, 2026
7a6882a
Phase 1: Response header sanitization & proxy hardening
jbarwick Feb 10, 2026
d16ef77
Phase 2: DNS wiring & SSRF hardening
jbarwick Feb 10, 2026
cf2a2e3
Phase 3: Streaming response pipeline — 3-path content router
jbarwick Feb 10, 2026
1e1db94
Tune MaxContentScanSize: 10MB→2MB default, add GS_MAX_SCAN_SIZE_MB en…
jbarwick Feb 10, 2026
a61b25c
Phase 4: WebSocket tunnel, DNS cache, NXDOMAIN fix
jbarwick Feb 10, 2026
f45eb03
Phase 5: Content scanning hardening — Via/gzip fix, TRACE block, dead…
jbarwick Feb 10, 2026
04aef53
Remove dead legacy proxy code (application/proxy/)
jbarwick Feb 10, 2026
8f318e2
Fix typos in plan document executive summary
jbarwick Feb 10, 2026
b5c7f88
Address PR review: remove secrets, fix portability, harden code
jbarwick Feb 10, 2026
885e0f5
Merge branch 'feature/docker-publish' into release
jbarwick Feb 10, 2026
f78fdb7
Merge branch 'feature/proxy-hardening' into release
jbarwick Feb 10, 2026
120e57c
feat(dns): add sharded DNS response cache with SSE event streaming
jbarwick Feb 10, 2026
16c4a84
feat(dns): emit request events from DNS handler for real-time SSE stats
jbarwick Feb 10, 2026
58be7e3
feat(ui): real-time stats page via SSE, replacing 5-second polling
jbarwick Feb 10, 2026
22d718a
DNS cache improvements, filter reload fix, WPAD support, test coverage
jbarwick Feb 11, 2026
9d02987
Merge feature/dns-cache into release for v1.20.6.2
jbarwick Feb 11, 2026
5e56fc2
v2.0.0-alpha.1: Begin v2 development track
jbarwick Feb 12, 2026
f698f91
fix: update blocked domain test to expect A record (block page redire…
jbarwick Feb 12, 2026
69ead70
v2: Complete UI architecture overhaul + Domain List system + Rule eng…
jbarwick Feb 13, 2026
407f952
refactor: per-rule content filtering pipeline & comprehensive proxy t…
jbarwick Feb 13, 2026
cd757c3
Server-side rule test API, proxy deep tests, and domain list index fixes
jbarwick Feb 14, 2026
cc8b12b
feat: Prometheus metrics, debug endpoints, SSE hardening
jbarwick Feb 15, 2026
7eb6860
feat: add Proxy Traffic tab, fix PR #141 issues, add user handler fix…
jbarwick Feb 16, 2026
29967ac
feat: logs query API, WPAD bypass domains, user byte counting fix, ru…
jbarwick Feb 16, 2026
89a9ed9
feat: log proxy auth failures to /logs page
jbarwick Feb 16, 2026
190f082
docs: add DOCKERHUB_README_V2.md with What's New section, update publ…
jbarwick Feb 17, 2026
3cbaec5
feat: device store persistence, IP conflict eviction, DDNS enhancements
jbarwick Feb 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Only bin/ and Dockerfile are needed for the Docker build context.
# Exclude everything else.

*
!bin/gatesentrybin
!Dockerfile
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,21 @@ log.txt
docker_root
test-binaries
pr-binaries
dns_test_server.log
ui/.yarn/
ui/dist/

# Frontend build artifacts (generated by build.sh, embedded via //go:embed)
application/webserver/frontend/files/*
!application/webserver/frontend/files/.gitkeep

# Ephemeral test certificates — generated by tests/fixtures/gen_test_certs.sh
tests/fixtures/JVJCA.crt
tests/fixtures/JVJCA.key
tests/fixtures/httpbin.org.crt
tests/fixtures/httpbin.org.key
tests/fixtures/*:Zone.Identifier

# Test run artifacts
tests/proxy_benchmark_results.log
proxy_test_server.log
24 changes: 24 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
a5982af91ceaf5039f21f08f6d662b945a75c8ac:application/dns/discovery/store.go:generic-api-key:90
5e170653249ee87030d208b6d3449e6cb78e4879:DOCKER_DEPLOYMENT.md:generic-api-key:271
5e170653249ee87030d208b6d3449e6cb78e4879:DOCKER_DEPLOYMENT.md:generic-api-key:323
5e170653249ee87030d208b6d3449e6cb78e4879:DOCKER_DEPLOYMENT.md:generic-api-key:271
5e170653249ee87030d208b6d3449e6cb78e4879:DOCKER_DEPLOYMENT.md:generic-api-key:323
7a6882a897f71256096b581728dff464aa918052:tests/proxy_benchmark_suite.sh:generic-api-key:561
d7635db864060410dcab64498e960dad54902eee:gatesentryf/dns/cert/certificate-contents.go:private-key:31
d7635db864060410dcab64498e960dad54902eee:gatesentryf/proxy/certs.go:private-key:27
d7635db864060410dcab64498e960dad54902eee:gatesentryf/storage/storage.go:generic-api-key:11
d7635db864060410dcab64498e960dad54902eee:gatesentryf/runtime.go:private-key:197
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:private-key:40
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:168
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:169
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:173
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:174
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:175
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:184
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:185
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:186
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:195
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:196
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:197
8d3464a554a0cd837cda8edb85a40175faada267:log.txt:gcp-api-key:200
8b2ea0d88dff411d6ee8b2833d1a3e815609e474:squid3/certs/myCA.pem:private-key:1
142 changes: 142 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# GateSentry — golangci-lint configuration
# Covers the categories of issues caught by GitHub Copilot PR reviews:
# - Security (XSS, injection, credential exposure, header leaking)
# - Correctness (loop variable capture, nil derefs, unchecked errors)
# - Code quality (dead code, unused params, verbose logging patterns)
#
# Run: golangci-lint run ./...
# Or: make lint

version: "2"

run:
# Multi-module workspace: lint each module
go: "1.24"
timeout: 5m

linters:
default: none
enable:
# --- Security ---
- gosec # Finds security problems: XSS (G203), SQL injection, hardcoded creds (G101), weak crypto
- govet # Reports suspicious constructs (printf format mismatches, struct tag issues, etc.)

# --- Correctness ---
- staticcheck # Advanced static analysis (SA* checks): nil derefs, impossible conditions, deprecated APIs
- errcheck # Unchecked error returns — critical for a proxy/DNS server
- bodyclose # Unclosed HTTP response bodies (resource leaks)
- copyloopvar # Loop variable captured by pointer/closure (the exact range-loop bug Copilot caught)
- nilerr # Returning nil when err is non-nil (swallowed errors)
- durationcheck # Detects incorrect time.Duration multiplication
- intrange # Suggests integer range loops (Go 1.22+)

# --- Code Quality ---
- ineffassign # Detects useless assignments
- unconvert # Unnecessary type conversions
- unused # Unused code (functions, variables, types)
- gocritic # Opinionated linter: code simplification, performance, style
- misspell # Catches common typos in comments and strings

# --- Style (lightweight) ---
- revive # Fast, extensible linter (subset of golint successor)

formatters:
enable:
- gofmt # Enforces standard formatting

linters-settings:
gosec:
includes:
- G101 # Hardcoded credentials
- G103 # Unsafe package usage
- G201 # SQL string formatting
- G202 # SQL string concatenation
- G203 # Unescaped data in HTML templates ← catches XSS in block pages, PAC files
- G301 # Poor file permissions
- G302 # Poor file permissions on creation
- G304 # File path from tainted input
- G401 # Weak cryptographic primitive
- G501 # Importing blocklisted crypto package
- G601 # Implicit memory aliasing in for loop (pre-Go-1.22)

gocritic:
enabled-checks:
- appendAssign
- argOrder
- badCall
- badCond
- badRegexp
- dupArg
- dupBranchBody
- dupCase
- dupSubExpr
- exitAfterDefer
- flagDeref
- nilValReturn
- rangeExprCopy
- sloppyLen
- truncateCmp
- unnecessaryBlock

revive:
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: error-return
- name: error-strings
- name: exported
disabled: true # Too noisy for this codebase
- name: increment-decrement
- name: indent-error-flow
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: unreachable-code
- name: unused-parameter

staticcheck:
checks:
- "all"
- "-ST1000" # Package comments — not enforced yet
- "-ST1003" # Naming conventions — too noisy for existing code
- "-ST1016" # Method receiver names — too noisy

misspell:
locale: US

issues:
# Don't limit the number of issues per linter
max-issues-per-linter: 0
max-same-issues: 0

exclude-rules:
# Test files get relaxed rules
- path: _test\.go
linters:
- errcheck # Tests often intentionally ignore errors
- gosec # Test fixtures may have "hardcoded" test credentials
- bodyclose # Test HTTP clients don't always close bodies

# The proxy module is Go 1.17 — skip linters that need newer Go
- path: gatesentryproxy/
linters:
- copyloopvar # Needs Go 1.22+
- intrange # Needs Go 1.22+

# Shell/script-generated code
- path: ".*generated.*"
linters:
- all

output:
formats:
text:
path: stdout
format: colored-line-number
sort-results: true
sort-order:
- linter
- severity
- file
45 changes: 45 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# GateSentry — pre-commit hooks
# Runs security, correctness, and quality checks before each commit.
#
# Setup:
# pip install pre-commit (or: brew install pre-commit)
# pre-commit install
#
# Manual run:
# pre-commit run --all-files

repos:
# --- Go linting (golangci-lint) ---
- repo: https://github.com/golangci/golangci-lint
rev: v2.1.6
hooks:
- id: golangci-lint
name: golangci-lint
args: ["run", "--timeout=5m"]

# --- Secret detection ---
- repo: https://github.com/gitleaks/gitleaks
rev: v8.24.3
hooks:
- id: gitleaks
name: gitleaks (secret detection)

# --- Shell script linting ---
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
name: shellcheck
args: ["--severity=warning"]
files: \.(sh|bash)$

# --- Trailing whitespace & file hygiene ---
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-yaml
- id: check-json
12 changes: 10 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"editor.formatOnSave": true,
"[svelte]": {"editor.defaultFormatter": "svelte.svelte-vscode"}
}
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
},
// Go linting — use golangci-lint for comprehensive analysis
"go.lintTool": "golangci-lint",
"go.lintFlags": [
"--fast"
],
"go.lintOnSave": "workspace"
}
Loading