Skip to content

Bridge Service

ncepuee edited this page Aug 31, 2026 · 1 revision

Bridge Service

What it is

csdn_bridge.py is a small local HTTP server that the plugin starts and talks to. It owns a Playwright-driven Chromium browser that fills the CSDN editor and saves drafts on your behalf.

Where it lives and runs

  • The script ships inside the plugin folder. main.js embeds a base64 copy and writes csdn_bridge.py next to itself on first run — no manual copying into your vault.
  • On startup the plugin spawns: <python command> csdn_bridge.py --host 127.0.0.1 --port <port from Bridge URL>.
  • It listens on 127.0.0.1 only. Your notes travel from Obsidian to the bridge to CSDN and nowhere else.

Health check

curl http://127.0.0.1:8765/health
{
  "ok": true,
  "bridge_api_version": "0.5.0",
  "account_profiles": true,
  "playwright": true,
  "profile_dir": "C:\\Users\\you\\AppData\\Local\\CSDN-Draft-Publisher\\playwright-profile"
}
  • playwright: false → the interpreter you configured does not have Playwright installed.
  • bridge_api_version mismatch → an old bridge process is still running; toggle Enable bridge service off and on again.

External / manual bridge

You can run the bridge yourself:

python csdn_bridge.py --host 127.0.0.1 --port 8765

If port 8765 already answers when the plugin tries to start its own, the plugin reuses the running one and will not stop it when you toggle the service off.

Files created outside the vault

Path Purpose
<plugin folder>/csdn_bridge.py Written on first run from the embedded copy
%LOCALAPPDATA%\CSDN-Draft-Publisher\playwright-profile Default account browser profile (login state)
%LOCALAPPDATA%\CSDN-Draft-Publisher\profiles\account-* Additional account profiles

Deleting a profile directory logs that account out on this machine only.

Privacy

  • No telemetry, no analytics, nothing leaves your machine except traffic to csdn.net when syncing.
  • No CSDN username or password is ever stored by the plugin or the bridge; login state lives in the Chromium profiles above.

Clone this wiki locally