Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Change the repo, Create a Dockerfile#3

Open
millaguie wants to merge 7 commits into
renergr1nch:masterfrom
millaguie:master
Open

Change the repo, Create a Dockerfile#3
millaguie wants to merge 7 commits into
renergr1nch: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 referenced this pull request in millaguie/splitter 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 #3.1.2
millaguie referenced this pull request in millaguie/splitter Apr 2, 2026
- 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 referenced this pull request in millaguie/splitter Apr 2, 2026
…and validation (#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 referenced this pull request in millaguie/splitter Apr 2, 2026
.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 referenced this pull request in millaguie/splitter Apr 2, 2026
…own (#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 referenced this pull request in millaguie/splitter Apr 2, 2026
…rsion detection (#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 referenced this pull request in millaguie/splitter Apr 2, 2026
…ats page (#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 referenced this pull request in millaguie/splitter Apr 2, 2026
#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 referenced this pull request in millaguie/splitter Apr 2, 2026
- 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 referenced this pull request in millaguie/splitter Apr 2, 2026
… cookie auth (#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 referenced this pull request in millaguie/splitter Apr 2, 2026
millaguie referenced this pull request in millaguie/splitter Apr 2, 2026
millaguie and others added 2 commits April 5, 2026 01:37
Full rewrite of SPLITTER in Go, replacing the Bash codebase. Single
static binary with Cobra CLI, multi-instance Tor management, HAProxy
load balancing, geo-based anti-correlation rules, and modern Tor
feature auto-detection.

Key features:
- Native HTTPTunnelPort proxy mode (no Privoxy dependency)
- Auto-detected Tor features: Conflux, congestion control, CGO, post-quantum TLS
- Bridge support: Snowflake, WebTunnel, obfs4
- 4 configuration profiles: stealth, balanced, streaming, pentest
- Docker Compose with 5 preconfigured scenarios (balanced, speed-eu, speed-latam, stealth, pentest)
- Adaptive circuit rotation with fingerprinting resistance
- Tor Metrics API country list auto-fetch (12h cache)
- Exit node reputation checking via Onionoo API
- DNS leak detection, 3-layer privacy test suite
- Prometheus metrics endpoint
- SIGHUP config reload
- Multi-stage Docker build (alpine:3.21, Tor 0.4.9.6, HAProxy 3.0)
- 147 files, 15 Go packages, table-driven tests, Makefile
feat: SPLITTER v2.0.0-beta — complete Go rewrite
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