A local-only browser session bridge for your own accounts, test environments, and authorized automation.
LocalSessionBridge consists of:
- a Python broker bound to
127.0.0.1:17871; - Chromium/Brave and Firefox extensions;
- per-origin runtime permissions;
- automatic synchronization through
cookies.onChangedand periodic checks; - Windows current-user DPAPI encryption for persisted snapshots;
- a bearer-protected local API for retrieving a correctly filtered
Cookieheader.
Warning
Session cookies are credentials. Install this only on a computer you control, keep the local API token private, and enable only accounts and systems you are authorized to access. The broker intentionally refuses LAN or internet binding.
Requirements:
- Windows 10/11
- Python 3.10+
- Brave/Chrome/Chromium or Firefox Developer Edition
cd "$HOME\Downloads\LocalSessionBridge"
python .\dist\session-bridge-v1.0.0.pyz serveThe broker displays an eight-digit pairing code valid for ten minutes. The same code may pair any number of local browser/extension instances while that TTL remains valid. Restarting the broker, expiry, or manual rotation replaces the code.
- Open
brave://extensionsorchrome://extensions. - Enable Developer mode.
- Select Load unpacked.
- Select the
chromium-extensiondirectory. - Open the extension popup, enter only the pairing code, and select Connect.
Each browser/profile keeps its own extension-local site registry and client identity.
- Open
about:debugging#/runtime/this-firefox. - Select Load Temporary Add-on.
- Select
firefox-extension/manifest.json. - Pair the extension with the broker.
The popup automatically detects the active HTTP/HTTPS tab and reads the browser-provided page Title and URL.
If the active URL is not yet registered in that browser/profile, the popup shows an explicit Add button. Once registered, the row becomes On / Off.
There is no application-level site-count limit. Open another URL and select Add again to append another entry to that browser/profile's local registry.
Sites are keyed by normalized full URL, not by origin. Therefore two pages such as:
https://app.basecamp.com/6259481/projects/48506183
https://app.basecamp.com/6259488/projects/48506260
remain separate LocalSessionBridge entries even though both use the same app.basecamp.com origin.
The origin permission may be shared by the browser, but LocalSessionBridge still gives each saved URL its own internal session identifier.
Each row automatically displays:
- browser-provided page Title;
- URL;
- browser type;
- READY / ERROR / OFF state;
- cookie count;
- last synchronization time;
- active-tab state.
The popup reads only that browser/profile extension instance's storage.local. Brave entries do not populate Chrome's popup list, and Chrome entries do not populate Brave's popup list.
The broker can still hold encrypted snapshots from every paired client. Internal session identifiers include both the extension client identity and normalized full URL, so the same URL registered in two different browsers does not overwrite itself.
python .\dist\session-bridge-v1.0.0.pyz listThe local CLI/API still uses the internal session identifier when retrieving a cookie header:
python .\dist\session-bridge-v1.0.0.pyz get <session-id> `
--header-only `
--url "https://example.com/api/resource"Retrieve the local API token only on the same Windows account:
python .\dist\session-bridge-v1.0.0.pyz tokenFrom the repository root:
Set-ExecutionPolicy -Scope Process Bypass -Force
.\UPDATE-AND-START.ps1The script pulls main, builds the reusable-pair-code and title-aware broker runtime, rebuilds browser extension artifacts, runs Python/JavaScript/runtime verification, restarts the broker, copies the pairing code to the clipboard, and opens the Brave/Chrome extension pages.
Verification locks the multi-client pairing behavior, the explicit Add control, browser-local site storage, and full-URL site matching so the previous one-site-per-origin bug cannot silently return.
Reload the unpacked extension once after an update.
Set-ExecutionPolicy -Scope Process Bypass
.\INSTALL-AUTOSTART.ps1Remove the scheduled task:
.\UNINSTALL-AUTOSTART.ps1Delete all encrypted local state:
.\DELETE-ALL-LOCAL-DATA.ps1- Loopback-only bind guard:
127.0.0.1,::1, orlocalhost. - Per-origin extension permission prompts.
- Ten-minute pairing code reusable by unlimited local extension instances during its TTL.
- Separate random API and extension client tokens after pairing.
- Extension-origin binding during pairing and pushes.
- No cookie, header, request-body, or token values in HTTP logs.
- Windows current-user DPAPI for API tokens and cookie snapshots.
- Expired-cookie filtering, domain matching, path matching, and secure-cookie filtering.
See Security, Architecture, and API.
python .\scripts\build_release.py
python .\scripts\verify.pyGenerated artifacts are written to dist/.
Turkish documentation: README_TR.md
MIT. See LICENSE.