Skip to content

Change the repo, Create a Dockerfile#3

Open
millaguie wants to merge 5 commits intorenergr1nch:masterfrom
millaguie:master
Open

Change the repo, Create a Dockerfile#3
millaguie wants to merge 5 commits intorenergr1nch:masterfrom
millaguie:master

Conversation

@millaguie
Copy link
Copy Markdown

Change the repo structure to be able to work with the code.
Create a Dockerfile to:

  • reduce the image size from 1.42GB to 32MB
  • be able to build the image, creating a docker image by saving a running container is not part of dockers philosophy.
  • launch a container without needing to interact with it, having to operate a container is not part of dockers philosophy.

millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
…meter audit (#1.6)

- 81 Bash variables audited: 62 ported to YAML, 15 dropped (Go runtime)
- 29 hardcoded torrc values documented
- SETTINGS_MAP.md provides explicit mapping for every parameter
- Drives config system implementation in task renergr1nch#3.1.2
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
…rgr1nch#3.1.1)

- Created all internal/ package directories with doc.go placeholders
- Created templates/ with placeholder .gotmpl files
- Added Cobra CLI with subcommands: run, status, test, version
- Flags: --instances/-i, --countries/-c, --relay-enforce/-re/-r,
  --profile, --proxy-mode, --bridge-type, --verbose, --log, --log-level
- -re flag handled via PreprocessArgs (pflag panics on multi-char shorthands)
- Flag validation via PersistentPreRunE on all subcommands
- Updated main.go to call cmd.Execute()
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
…and validation (renergr1nch#3.1.2)

- Load priority: defaults → YAML → profile → env vars (SPLITTER_*) → CLI flags
- Comprehensive Config struct mapping all sections from default.yaml
- Profile support (stealth/balanced/streaming/pentest) from configs/profiles.yaml
- Env var override with explicit mapping table (60+ SPLITTER_* variables)
- Validation: instances, relay modes, proxy/bridge types, port ranges
- 23 unit tests covering load, merge, env override, profiles, validation
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
…energr1nch#3.1.3)

- Logging OFF by default (io.Discard handler) -- no logs, no crime
- JSON format when TERM=dumb or NO_COLOR set (Docker/container detection)
- Text format for terminal when enabled
- Level controlled by --log-level (debug|info|warn|error)
- Structured field helpers: InstanceField, CountryField, PortField
- 15 unit tests covering all modes and edge cases
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
…own (renergr1nch#3.1.4)

- Spawn child processes (tor, haproxy, privoxy) with process group isolation
- Graceful shutdown: SIGTERM -> wait 5s -> SIGKILL escalation
- Thread-safe process tracking with sync.Mutex
- Context cancellation support for goroutine-managed processes
- Temp file/directory cleanup on exit
- 14 unit tests including SIGTERM->SIGKILL escalation verification
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
…rsion detection (renergr1nch#3.2.1)

- Tor version detection with feature flags (Conflux, HTTPTunnel, CGO, CongestionControl)
- Goroutine-managed instances with exponential backoff restart (1s→2s→4s→max 30s)
- Torrc template generation with relay enforcement modes (entry/exit/speed)
- Hidden service per instance on unique port
- MaxCircuitDirtiness randomized per instance (matching original Bash behavior)
- 25 unit tests covering version parsing, torrc generation, manager creation
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
…ats page (renergr1nch#3.2.2)

- Generate haproxy.cfg from template with shuffled backends for anti-correlation
- Stats page on port 63539 with random password (matching Bash behavior)
- Health check configuration per instance
- Start/stop/reload with seamless socket takeover (-sf)
- Native mode (HTTPTunnelPort) and legacy mode (Privoxy) support
- 15 unit tests covering config generation, shuffle, and password generation
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
renergr1nch#3.2.3)

- Native mode: no-op proxy, Tor HTTPTunnelPort handles HTTP CONNECT directly
- Legacy mode: generates Privoxy configs, spawns Privoxy per Tor instance
- Decoupled design: proxy package defines own Instance struct, consumers convert
- Privoxy template forwards HTTP to Tor SOCKS port per instance
- 14 unit tests covering both modes, setup, start/stop, template rendering
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
…r1nch#3.2.4)

- Random country selection without duplicates, excludes blacklisted
- Rotation daemon as goroutine with configurable interval and jitter
- InstanceRotator interface decouples from tor.Manager
- pickDifferentCountry guarantees new country differs from current
- 13 unit tests (6 selector + 7 daemon)
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
… cookie auth (renergr1nch#3.2.5)

- Connect to Tor control port, authenticate via cookie auth
 send SIGNAL newnym
 for clean circuits.
 randomized intervals per instance (10-15s range).
 13 unit tests covering: client connection, auth, circuit renewal signal New circuits, and port allocation
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
millaguie added a commit to millaguie/splitter that referenced this pull request Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant