Allow users to pause the proxy for a set duration (1/5/15/30/60 min)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 432
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Add the ability to pause the proxy for a fixed amount of time. Users sometimes need to temporarily disable interception (e.g. to debug a connectivity issue, hit an endpoint that breaks under interception, or get unblocked quickly) without having to remember to turn the proxy back on. A timed pause that auto-resumes solves this.
User-facing behavior
In Settings, add a "Pause proxy" control:
- An on/off switch to pause/resume the proxy.
- When turning the pause on, the user picks a duration: 1, 5, 15, 30, or 60 minutes.
- While paused, traffic passes through untouched (no PII processing / interception).
- When the timer elapses, the proxy automatically resumes and the switch flips back to off.
- The UI should show that the proxy is paused and ideally a countdown / "resumes at HH:MM".
- Toggling the switch off manually resumes immediately before the timer elapses.
Suggested implementation
This feature extends the existing transparent-proxy enable/disable machinery rather than adding a parallel system.
Backend (Go)
- The gate already exists:
TransparentProxy.IsEnabled()(src/backend/proxy/transparent.go:76) is checked first inServeHTTP(transparent.go:84); when not enabled, traffic is passed through untouched. A pause = make this returnfalseuntil a "paused-until" timestamp. - Store a
pausedUntil time.Timeon theServer(next totransparentProxyEnabled/transparentProxyMu,src/backend/server/server.go:83-84) and haveIsTransparentProxyEnabled()(server.go:928) also consult it. A background timer (or lazy check on each request) clears the pause when it expires. - Add an endpoint modeled on
handleTransparentProxyToggle(server.go:888), e.g.POST /api/proxy/pausewith{ "minutes": N }and a resume/clear variant. - Decide whether the pause should also bypass the Playground/API path (
Handler.ServeHTTP,src/backend/proxy/handler.go:154), which currently has no enabled gate — if so, add an early bypass check there too.
Persistence / scheduling (Electron)
- Mirror the
defineConfigField("transparentProxyEnabled", ...)pattern (src/frontend/src/electron/ipc-handlers.js:476) andnotifyBackendBestEffortso the pause survives a renderer reload. Persist thepausedUntiltimestamp (not just a boolean) so the remaining time is accurate after a restart.
Frontend (React)
- Reuse the existing on/off switch UI from the Transparent Proxy toggle in
AdvancedSettingsModal.tsx:206-240(state at lines 30-31, handlerhandleToggleTransparentProxylines 71-94, switch markup lines 213-225). - Add the duration choices (1/5/15/30/60 min) as buttons or a select next to the switch.
- Surface the control from Settings (
SettingsModal.tsx) or Advanced Settings, and show the paused state + countdown.
Notes / open questions
- Should the pause apply to both the transparent proxy and the Playground/API path, or only the transparent proxy?
- Where should the control live — main Settings or Advanced Settings?
- Should remaining pause time persist across app restart (recommended: yes, via a timestamp)?
There is currently no existing pause/timer/expiry concept in the codebase; the closest precedent is the transparent-proxy enable/disable toggle, which this should build on.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with TransparentProxy.IsEnabled and ServeHTTP in src/backend/proxy/transparent.go, then inspect server.go, handler.go, ipc-handlers.js, AdvancedSettingsModal.tsx, and SettingsModal.tsx. Resolve the open questions about API-path coverage, control placement, and restart persistence before implementing the timed pause. Done means the selected durations pause the applicable traffic, the UI shows the remaining time, manual resume works, and expiry restores interception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, go, javascript, react
- Domain
- api, backend, desktop, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100