How focuxdot/wokey-provider-node works
Provider Node is a local onboarding console and restricted outbound relay, not the platform’s routing or billing engine. The main workflow is user setup and node binding, followed by credential authorization/import; the node then maintains an outbound Platform connection and relays requested traffic to approved vendor hosts. The graph also shows local configuration, diagnostics, Jimeng operations and runtime updates. Some subsystem links rely on explicit README descriptions or SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: server.ts Console and API server · bridge.ts Platform WebSocket bridge · official-exit.ts Official exit tunnels · local-auth-detect.ts Local auth detection
Components 22
Onboarding and Console
- Local console
web/console/app.js - Console and API server
src/provider-node/server.ts - Local auth detection
src/provider-node/local-auth-detect.ts - Claude credentials
src/provider-node/claude-code-auth.ts - Codex auth import
src/provider-node/codex-auth-json.ts - Manual OAuth tokens
src/provider-node/manual-oauth-token.ts - Device authorization
src/provider-node/bounded-device-poller.ts - Jimeng authorization
src/provider-node/jimeng-auth.ts
Platform Connection
- Platform WebSocket bridge
src/provider-node/bridge.ts - Control protocol
src/shared/protocol.ts - WebSocket send scheduler
src/shared/websocket-send-scheduler.ts
Restricted Egress
- Official exit tunnels
src/provider-node/official-exit.ts - Exit frame codec
src/shared/official-exit-binary.ts - Vendor host allowlist
src/shared/official-exit-vendors.ts - Jimeng video tasks
src/provider-node/jimeng-video.ts
Local Runtime
- Encrypted configuration
src/provider-node/config.ts - Automatic upgrades
src/provider-node/auto-upgrade.ts - macOS runtime updater
src/provider-node/macos-runtime-updater.ts - Risk and health state
src/provider-node/risk.ts
Other components
- Node operator
- Wokey Platform
- Official vendor hosts
Connections 23
- Node operator → Local console: uses locally
README.md - Local console → Console and API server: calls local API
src/provider-node/server.ts - Console and API server → Encrypted configuration: loads and persists
src/provider-node/config.ts - Console and API server → Local auth detection: detects credentials
src/provider-node/server.ts - Local auth detection → Claude credentials: checks Claude
src/provider-node/local-auth-detect.ts - Local auth detection → Codex auth import: checks Codex
src/provider-node/local-auth-detect.ts - Console and API server → Manual OAuth tokens: accepts token import
src/provider-node/server.ts - Console and API server → Device authorization: supports device flows
- Console and API server → Jimeng authorization: starts authorization
src/provider-node/server.ts - Console and API server → Jimeng video tasks: handles task routes
src/provider-node/server.ts - Console and API server → Platform WebSocket bridge: starts bridge
src/provider-node/server.ts - Platform WebSocket bridge → Wokey Platform: connects outbound
README.md - Platform WebSocket bridge → Control protocol: exchanges control messages
src/provider-node/bridge.ts - Platform WebSocket bridge → WebSocket send scheduler: schedules sends
src/provider-node/bridge.ts - Platform WebSocket bridge → Official exit tunnels: dispatches exit traffic
src/provider-node/bridge.ts - Official exit tunnels → Exit frame codec: decodes frames
src/provider-node/official-exit.ts - Official exit tunnels → Vendor host allowlist: enforces hosts
src/provider-node/official-exit.ts - Official exit tunnels → Official vendor hosts: relays TCP bytes
README.md - Jimeng video tasks → Official exit tunnels: uses exit path
- Console and API server → Automatic upgrades: reports upgrade state
src/provider-node/server.ts - Automatic upgrades → macOS runtime updater: uses runtime updater
- Platform WebSocket bridge → Risk and health state: checks relay readiness
src/provider-node/bridge.ts - Wokey Platform → Platform WebSocket bridge: requests outbound sessions
README.md