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 in ServeHTTP (transparent.go:84); when not enabled, traffic is passed through untouched. A pause = make this return false until a "paused-until" timestamp.
- Store a
pausedUntil time.Time on the Server (next to transparentProxyEnabled / transparentProxyMu, src/backend/server/server.go:83-84) and have IsTransparentProxyEnabled() (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/pause with { "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) and notifyBackendBestEffort so the pause survives a renderer reload. Persist the pausedUntil timestamp (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, handler handleToggleTransparentProxy lines 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.
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:
Suggested implementation
This feature extends the existing transparent-proxy enable/disable machinery rather than adding a parallel system.
Backend (Go)
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.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.handleTransparentProxyToggle(server.go:888), e.g.POST /api/proxy/pausewith{ "minutes": N }and a resume/clear variant.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)
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)
AdvancedSettingsModal.tsx:206-240(state at lines 30-31, handlerhandleToggleTransparentProxylines 71-94, switch markup lines 213-225).SettingsModal.tsx) or Advanced Settings, and show the paused state + countdown.Notes / open questions
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.