Development Setup
Prerequisites
- Go 1.25 or later
- Mullvad VPN (for running the scanner)
- Git
Clone and Build
git clone ssh://git@git.redn3t.com:2222/Redn3t/odirscan.git
cd odirscan
go build ./...
Branch Workflow
main-- Stable branch. All PRs targetmain.dev-- Active development branch.
Running
For local testing, edit the URL list in main.go and run:
go run .
Make sure your Mullvad VPN is connected before running.
Smoke Testing
After implementing features involving goroutines, signal handling, or context cancellation, verify with a manual smoke test:
go build -o odirscan . && ./odirscan & sleep 2; kill -INT $!
This confirms the binary starts, runs briefly, and shuts down cleanly on interrupt.
Code Generation
The Mullvad relay and "am I connected" types are generated from JSON schemas in resources/:
resources/mullvad_relay_schema.json->internal/mullvad/relay.goresources/mullvad_ami_schema.json->internal/mullvad/ami.go
These are generated using go-jsonschema.