Zero-Trust End-to-End Encrypted (AES-256-GCM) OpenAI Inference Bridge & Ephemeral Ciphertext Mailbox for Remote GPUs.
When renting cloud GPUs on shared or third-party infrastructure (RunPod, Vast.ai, Lambda, AutoDL, or remote Jupyter pods), standard HTTPS ingress proxies terminate TLS at the provider's edge—exposing plaintext prompts, proprietary system instructions, multimodal images, and generated media to edge gateways, reverse-proxy logs, and shared disks.
kiss-shot (Codename: Kiss-Shot / 姬丝秀忒) establishes an application-layer zero-trust cryptographic bond directly from 127.0.0.1 on your local workstation into the remote GPU process memory:
- Streaming OpenAI-Compatible AEAD Bridge: Exposes a standard
http://127.0.0.1:18443/v1endpoint locally (drop-in for the OpenAI SDK, LangChain, Cursor, Continue, OpenWebUI, or SillyTavern) while sealing every request and streaming SSE token chunk withPBKDF2-HMAC-SHA256(210,000iterations) +AES-256-GCM, strict domain-separated AADs (AAD_PAYLOAD,AAD_TICKET,AAD_BLOB,AAD_ARCHIVE), and 24-hour authenticated TTL envelopes. - Dynamic Ephemeral Routing, Anti-Replay & SSRF Allowlist: Each remote gateway session generates a fresh random route (
/v1/ks-<random>) and 128-bit session salt embedded inside an authenticatedKISSSHOT_TICKET:...handshake string, backed by a±300sclock check, a bounded request-ID replay filter (ReplayGuard),BoundedSemaphoreconcurrency control, and strict upstream path allowlisting (/v1/*,/health). Unauthenticated probes immediately receive403 Forbidden. - Stream Integrity & Truncation Detection: Streaming SSE chunks bind monotonic sequence numbers (
kissshot-s2c:<req_id>:<seq>) and an authenticated termination tag (EOF:...) into GCM Additional Authenticated Data (AAD), defeating chunk reordering, injection, and silent middlebox truncation. - Transactional Ciphertext Queue v2 & Zero-WebUI Local Visual Studio: For asynchronous Image/Video workloads (
MOSS-Image-SFT,SDXL,FLUX.1,Wan 2.1/2.2 T2V & I2V,Wan 2.2 TI2V-5B,HunyuanVideo-1.5), the local desktop console provides an offlineInpaintingbrush mask painter, a centered-originMOSSspatial BBox composer, dynamic LoRA strength controls, a SQLite WAL encrypted job ledger & outbox (.kissshot_jobs.sqlite3), and aDPAPI/POSIX 0600encrypted recipe gallery. Jobs are dispatched atomically to_queue/v2/underAAD_QUEUE(withhf_tokenstripped from queue payloads andparent_commitCAS retry), claimed by remote workers via_claims/<job_id>.jsonlease heartbeats, inferred purely in memory (BytesIO//dev/shm) from pinned per-repo commit SHAs with executable-file stripping and approved SHA-256-verified custom code, packed into a256-bit WinZip AES(WZ_AES,ZIP_STOREDzero-compression + obfuscated inner filenames) archive wrapped inside an outerAES-256-GCM(AAD_ARCHIVE) envelope, atomically committed alongside_receipts/<job_id>.json, downloaded under revision-lockedblob_idverification with idempotentpacket_idunpacking, and conditionally burned only after verified local decryption. - Local Workstation, Supply-Chain & Daemon Hardening: Protects local passphrases/tokens at rest via Windows
DPAPI(CryptProtectData) or POSIX0600owner-only vaults, enforcesX-KissShot-Admin-TokenIPC authentication, blocks browser DNS Rebinding (Host) andSec-Fetch-Site: cross-siteattacks, sanitizes response MIME headers (X-Content-Type-Options: nosniff), enforces single-profile SillyTavern binding with pre-edit backups, applies optional runtime dependency lock verification (runtime_lock.py,strict=Falsecompatibility default) and engine binary SHA-256 checks (verified_engine), selectively scrubs onlyKISSSHOT_-related IPython history rows without wiping unrelated work, and marks copied secrets as excluded from Windows Clipboard History & Cloud Sync with automatic timer scrubbing.
flowchart LR
subgraph Workstation["Local Workstation (Trusted)"]
Client["OpenAI SDK / WebUI / CLI"]
LocalBridge["kiss-shot (127.0.0.1:18443/v1)"]
Client -->|"Plaintext HTTP (Loopback)"| LocalBridge
end
subgraph UntrustedNet["Edge Proxy / Public Network (Untrusted)"]
Edge["Cloud Ingress / Reverse Proxy"]
end
subgraph GPUHost["Remote GPU Container"]
RemoteGW["RemoteAEADGateway (:8081 /v1/ks-random)"]
Engine["llama-server / vLLM / Ollama (127.0.0.1:8080)"]
RemoteGW -->|"Decrypted Loopback"| Engine
end
LocalBridge <-->|"High-Entropy AES-256-GCM + Seq AAD"| Edge
Edge <-->|"Opaque Binary / Encrypted SSE"| RemoteGW
| Threat Vector | Standard HTTPS Proxy / Tunnel | kiss-shot |
|---|---|---|
| Edge TLS termination inspecting prompts / Vision images | Exposed at edge proxy | Protected (AES-256-GCM sealed on 127.0.0.1 before egress) |
| Public URL / port scanners probing inference endpoints | Exposes /v1/models & API fingerprint |
Protected (random dynamic route + 403 Forbidden on unauthenticated bytes) |
| Replay of captured encrypted HTTP requests | Vulnerable without app-layer nonces | Protected (±300s clock check + bounded ReplayGuard request-ID filter) |
| SSE stream chunk reordering or premature truncation | Undetected partial output | Protected (per-chunk seq in AAD + mandatory authenticated EOF tag) |
| Shared cloud disk retaining batch images/videos | Plaintext files on container disk | Protected (BytesIO / /dev/shm + outer AES-256-GCM + inner WZ_AES ZIP_STORED + burn-after-reading) |
| Cross-context ciphertext grafting / ZIP bomb archive | Unchecked archive headers & compression | Protected (domain-separated AADs, 24h TTL, ZIP_DEFLATED rejection & 2 GiB streaming cap) |
Malicious browser tab probing 127.0.0.1 (DNS Rebinding / XSS) |
Wildcard CORS or unauthenticated loopback | Protected (strict Host & Sec-Fetch-Site guard, X-KissShot-Admin-Token IPC, nosniff sanitization) |
| Plaintext credentials on disk or Cloud Clipboard sync | Cleartext JSON & persistent clipboard history | Protected (Windows DPAPI / POSIX 0600 vault + cloud-clipboard exclusion & auto-scrub) |
Scope Note: Application-layer E2EE protects data in transit across untrusted networks/proxies and avoids plaintext persistence on remote storage. Once decrypted inside the remote GPU process for matrix multiplication, a malicious host hypervisor with raw physical RAM/VRAM dump access remains outside the boundary of software-only encryption (require hardware confidential computing / H100 TEE for host-memory isolation).
git clone https://github.com/zanex-dev/kiss-shot.git
cd kiss-shot
pip install -r requirements.txt
pip install -e .On the remote GPU server (where vLLM, llama-server, or Ollama is listening on 127.0.0.1:8080):
kiss-shot remote-gateway \
--public-url https://your-pod-8081.proxy.example.com \
--listen-port 8081 \
--upstream http://127.0.0.1:8080Enter your session passphrase when prompted, then copy the printed KISSSHOT_TICKET:... line.
On your local workstation:
# Option A: Launch the cross-platform desktop GUI console (closes to Windows system tray to keep bridge alive)
kiss-shot panel
kiss-shot panel --minimized # Optional: start directly in the Windows system tray
kiss-shot shortcut # Optional (Windows): register Start Menu & Taskbar-pinnable app shortcut
# Option B: Run the headless CLI OpenAI proxy (auto-detects KISSSHOT_TICKET from clipboard)
kiss-shot bridge --port 18443Point any OpenAI-compatible client to http://127.0.0.1:18443/v1:
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:18443/v1", api_key="kissshot-local")
stream = client.chat.completions.create(
model="kiss-shot-llm",
messages=[{"role": "user", "content": "Explain authenticated encryption with associated data."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")For interactive cloud GPU environments, ready-to-run templates are provided under notebooks/:
notebooks/remote_llm_gateway.ipynb— In-memoryAES-256-GCMgateway wrapping local127.0.0.1:8080LLM/VLM servers.notebooks/remote_media_worker.ipynb— Zero-disk-persistence Diffusion & Video worker withWZ_AES256-bit encrypted archive relay.
Run the full cryptographic, live HTTP/SSE loopback E2EE, anti-replay, truncation-detection, and repository hygiene test suite:
python -m unittest discover -s tests -vLicensed under the PolyForm Noncommercial License 1.0.0 (PolyForm-Noncommercial-1.0.0) — free for personal, educational, and noncommercial use; commercial use, paid SaaS, bundling, or resale of the code or assets/ artwork is strictly prohibited without prior written authorization from zanex-dev.
Required Notice: Copyright (c) 2026 zanex (zanex-dev) (https://github.com/zanex-dev/kiss-shot)
