Skip to content

Commit 790a856

Browse files
committed
docs(readme): use Mermaid diagram for architecture
1 parent 3b1bf83 commit 790a856

1 file changed

Lines changed: 24 additions & 19 deletions

File tree

README.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,30 @@ OpenClaw gets phantom tokens (random strings that look like real API keys). Slui
1515

1616
## How It Works
1717

18-
```
19-
+-----------+ +------------+ +---------+ +----------+
20-
| | MCP | Sluice | TCP | | | |
21-
| OpenClaw +---->+ MCP Gateway+---->+ Upstream | | Telegram |
22-
| | | | | Servers | | Bot |
23-
| (phantom | +-----+------+ +---------+ +----+-----+
24-
| tokens) | | |
25-
| | +-----v------+ approve / deny
26-
| | ALL | Sluice | +---------+ |
27-
| +---->+ SOCKS5 +---->+ | +-----v-----+
28-
| | | Proxy | |Internet | | Human |
29-
+-----------+ +-----+------+ +---------+ +-----------+
30-
^ |
31-
| +-----v------+
32-
phantom | MITM |
33-
tokens | credential |
34-
| injection |
35-
+------------+
36-
phantom -> real
18+
```mermaid
19+
flowchart LR
20+
subgraph Isolated["OpenClaw (isolated)"]
21+
OC[OpenClaw<br/>phantom tokens]
22+
end
23+
24+
subgraph Sluice
25+
GW[MCP Gateway<br/>tool policy + inspection]
26+
PX[SOCKS5 Proxy<br/>network policy + MITM]
27+
end
28+
29+
TG[Telegram Bot<br/>approve / deny]
30+
HM[Human]
31+
UP[Upstream<br/>MCP Servers]
32+
IN[Internet]
33+
34+
OC -- "MCP tool calls" --> GW
35+
OC -- "all TCP/UDP<br/>(via tun2proxy)" --> PX
36+
GW --> UP
37+
PX -- "phantom -> real<br/>credential swap" --> IN
38+
PX -. "ask verdict" .-> TG
39+
TG -. "allow / deny" .-> HM
40+
HM -. "respond" .-> TG
41+
TG -. "resolve" .-> PX
3742
```
3843

3944
**OpenClaw** uses phantom tokens for all API calls. **tun2proxy** routes all traffic to sluice's SOCKS5 proxy (runs as a container in Docker, on the host for Apple Container/macOS VM). **Sluice** evaluates every connection against policy rules (allow / deny / ask). "Ask" verdicts send a Telegram notification with inline buttons. The MITM proxy swaps phantom tokens for real credentials in-flight. Credentials are managed via Telegram or CLI, stored encrypted with age, and hot-reloaded into OpenClaw without restarts.

0 commit comments

Comments
 (0)