Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.99 KB

CONTRIBUTING.md

File metadata and controls

50 lines (39 loc) · 1.99 KB

Contributing

Thanks for looking. perbrowser is deliberately small: one POSIX shell script, no dependencies beyond the pinned wireproxy binary. Contributions that keep it that way are very welcome.

Dev setup

brew install shellcheck bats-core
shellcheck perbrowser   # must be clean
bats tests/             # must pass. Runs offline against a fake $HOME

The tests stub launchctl, curl, lsof, and sleep, so they never touch your real agents or the network. If you add behavior, add a test.

Ground rules

  • POSIX sh only (set -eu, no bashisms). shellcheck must stay clean.
  • One file. If a feature can't fit tastefully in the single script, it probably belongs in a fork or a v2 discussion first.
  • Security-sensitive defaults are not negotiable: confs stay 600, wireproxy stays pinned + checksum-verified, health checks test real traffic (not logs), leak-prevention flags stay on.
  • macOS behavior is verified on Apple Silicon; Intel is best-effort. Say in your PR which you tested on.

Help wanted

Roughly in order of demand:

  1. Firefox support. Different mechanism entirely: a dedicated profile with user.js prefs (network.proxy.*, media.peerconnection.*) instead of command-line flags. Needs thought about tamper-resistance: prefs can be changed in-app, flags can't.
  2. Linux support. Same design, systemd user units instead of launchd, .desktop entries instead of .app bundles. The script is structured so platform bits (plist/app generation, launchctl) are isolated functions.
  3. More Chromium-family browsers (Vivaldi, Arc, Opera): mostly a matter of adding the app name mapping and testing the flags actually apply.
  4. doctor checks: more failure modes from the wild, each with a safe auto-fix or a printed remedy.

Reporting bugs

perbrowser doctor <name> output plus the tail of ~/.config/perbrowser/<name>/wireproxy.log covers most of what's needed. Never paste your wg.conf or anything containing PrivateKey.