codex-web-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +372 -0
- package/bin/codex-web-ui +4 -0
- package/launch_codex_webui_unpacked.sh +1278 -0
- package/package.json +15 -0
- package/webui-bridge.js +202 -0
package/README.md
ADDED
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# ๐ Codex App Web UI Enabler
|
|
4
|
+
|
|
5
|
+
### ๐ Run OpenAI Codex Desktop in Your Browser โ From Any Device ๐
|
|
6
|
+
|
|
7
|
+
[](https://www.gnu.org/software/bash/)
|
|
8
|
+
[](https://www.electronjs.org/)
|
|
9
|
+
[](https://github.com/friuns2/codex-unpacked-toolkit)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://github.com/friuns2/codex-unpacked-toolkit)
|
|
12
|
+
[](https://github.com/friuns2/codex-unpacked-toolkit/stargazers)
|
|
13
|
+
[](https://github.com/friuns2/codex-unpacked-toolkit/network)
|
|
14
|
+
|
|
15
|
+
<br />
|
|
16
|
+
|
|
17
|
+
<img src="https://img.shields.io/badge/โก_ONE_SCRIPT_TO_RULE_THEM_ALL-black?style=for-the-badge&labelColor=black" />
|
|
18
|
+
|
|
19
|
+
<br />
|
|
20
|
+
|
|
21
|
+
> **Codex Desktop's full UI โ chat, skills, file editing, code execution โ**
|
|
22
|
+
> **accessible from any browser on any device. No Electron window required.**
|
|
23
|
+
>
|
|
24
|
+
> **One script. Full Web UI. Anywhere.** ๐
|
|
25
|
+
|
|
26
|
+
<br />
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
โโโโโโโ โโโโโโโ โโโโโโโ โโโโโโโโโโโ โโโ โโโ โโโโโโโโโโโโโโโโโโ โโโ โโโโโโ
|
|
30
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ โโโโโโโโโโโโโโโโโโโ โโโ โโโโโโ
|
|
31
|
+
โโโ โโโ โโโโโโ โโโโโโโโโ โโโโโโ โโโ โโ โโโโโโโโโ โโโโโโโโ โโโ โโโโโโ
|
|
32
|
+
โโโ โโโ โโโโโโ โโโโโโโโโ โโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโ โโโ โโโโโโ
|
|
33
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโ
|
|
34
|
+
โโโโโโโ โโโโโโโ โโโโโโโ โโโโโโโโโโโ โโโ โโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโ โโโ
|
|
35
|
+
E N A B L E R
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## ๐คฏ What Is This?
|
|
43
|
+
|
|
44
|
+
OpenAI's Codex Desktop is a powerful AI coding agent โ but it's locked inside an Electron window on a single machine. What if you could access it **from any browser, on any device, anywhere on your network?**
|
|
45
|
+
|
|
46
|
+
We reverse-engineered the minified Electron bundle and built scripts that **patch the app at runtime** to expose the full Codex UI over HTTP + WebSocket. The same scripts also unlock a **hidden SSH remote execution engine** that was already compiled into the binary but never wired up.
|
|
47
|
+
|
|
48
|
+
**One command. Full Web UI. Plus SSH remote control. No recompilation.**
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## ๐ฑ See It In Action โ Codex in Your Browser, From Any Device
|
|
53
|
+
|
|
54
|
+
> **Yes, that's a phone. Yes, that's Codex. Yes, it's running on a Mac across the network.**
|
|
55
|
+
|
|
56
|
+
<div align="center">
|
|
57
|
+
<table>
|
|
58
|
+
<tr>
|
|
59
|
+
<td align="center" width="50%">
|
|
60
|
+
<img src="images/mobile-chat-session.jpeg" width="300" />
|
|
61
|
+
<br />
|
|
62
|
+
<b>๐ฌ Live AI Chat Session</b>
|
|
63
|
+
<br />
|
|
64
|
+
<sub>Full Codex conversation running on a Mac, controlled from an Android phone over the network. GPT-5.3-Codex responding in real-time. The address bar says it all: <code>100.107.32.83:5999</code> โ that's a remote Mac.</sub>
|
|
65
|
+
</td>
|
|
66
|
+
<td align="center" width="50%">
|
|
67
|
+
<img src="images/mobile-skills-browser.jpeg" width="300" />
|
|
68
|
+
<br />
|
|
69
|
+
<b>๐งฉ Skills Manager โ From Your Pocket</b>
|
|
70
|
+
<br />
|
|
71
|
+
<sub>Browsing and managing Codex skills (Playwright, Oracle Cloud CLI, Three.js, YouTube Search...) from a mobile browser. Full desktop functionality, zero compromises.</sub>
|
|
72
|
+
</td>
|
|
73
|
+
</tr>
|
|
74
|
+
</table>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
> ๐คฏ **This is not a mockup.** This is a real Codex Desktop instance running on macOS, patched with our Web UI Enabler scripts, accessed from a mobile phone browser over Tailscale. Every feature works โ chat, skills, file editing, code execution โ all from your pocket.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## ๐ What Can You Actually Do With This?
|
|
82
|
+
|
|
83
|
+
With the Web UI enabled, Codex breaks free from the Electron window โ and with SSH mode unlocked, it reaches **any machine you own**:
|
|
84
|
+
|
|
85
|
+
| ๐ฏ Use Case | ๐ก Description |
|
|
86
|
+
|---|---|
|
|
87
|
+
| ๐ฑ **Code From Your Phone** | Open Codex in any mobile browser โ full chat, skills, file editing, code execution |
|
|
88
|
+
| ๐ป **Use Any Browser** | Chrome, Firefox, Safari, Arc โ no Electron install needed on the client |
|
|
89
|
+
| ๐ **Access Over the Network** | Tailscale, LAN, VPN โ access your Codex instance from anywhere securely |
|
|
90
|
+
| ๐ฅ๏ธ **Control Your Mac Remotely** | SSH into your MacBook from anywhere and let Codex operate it as if you're sitting in front of it |
|
|
91
|
+
| ๐ง **Orchestrate Linux Servers** | Point Codex at your Ubuntu/Debian/Arch boxes and run AI-powered coding sessions remotely |
|
|
92
|
+
| ๐ช **Manage Windows via WSL** | Connect through WSL2 SSH and bring Codex intelligence to your Windows dev environment |
|
|
93
|
+
| ๐ **Command Your Homelab** | Proxmox, TrueNAS, Raspberry Pi clusters โ Codex becomes your AI sysadmin |
|
|
94
|
+
| โ๏ธ **Cloud Fleet Management** | AWS EC2, Oracle Cloud, DigitalOcean droplets โ manage entire fleets from one Codex window |
|
|
95
|
+
| ๐ง **Web Service Orchestration** | Nginx configs, Docker containers, systemd services โ edit and deploy across machines |
|
|
96
|
+
| ๐งช **Remote CI/CD Pipelines** | Trigger builds, inspect logs, fix failing tests on remote CI runners in real-time |
|
|
97
|
+
| ๐ก **IoT & Edge Devices** | SSH into Raspberry Pis, Jetson Nanos, or any edge device and code directly on them |
|
|
98
|
+
| ๐๏ธ **Multi-Machine Refactoring** | Coordinate code changes across microservices running on different hosts simultaneously |
|
|
99
|
+
|
|
100
|
+
> **TL;DR:** Codex in your browser + SSH to any machine = your entire infrastructure as one AI-powered IDE. ๐ง
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## โก Quick Start
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Clone this repo
|
|
108
|
+
git clone https://github.com/friuns2/codex-unpacked-toolkit.git
|
|
109
|
+
cd codex-unpacked-toolkit
|
|
110
|
+
|
|
111
|
+
# ๐ Launch the Web UI โ access Codex from any browser
|
|
112
|
+
./launch_codex_webui_unpacked.sh --port 5999
|
|
113
|
+
|
|
114
|
+
# ๐ Or launch with SSH mode unlocked (connects to your remote host)
|
|
115
|
+
./launch_codex_unpacked.sh --ssh-host user@your-server.com
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Open `http://127.0.0.1:5999/` and you're flying. โ๏ธ
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## ๐ Project Structure
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
codex-unpacked-toolkit/
|
|
126
|
+
โโโ ๐ launch_codex_webui_unpacked.sh # WebUI mode launcher (browser access)
|
|
127
|
+
โโโ ๐ง launch_codex_unpacked.sh # SSH unlock & debug launcher
|
|
128
|
+
โโโ ๐ webui-bridge.js # Browser-side WebSocket โ IPC bridge
|
|
129
|
+
โโโ ๐ PROJECT_STATE.md # Living project state & patching reference
|
|
130
|
+
โโโ ๐ images/ # Screenshots & proof it works
|
|
131
|
+
โ โโโ mobile-chat-session.jpeg # Codex chat from mobile phone
|
|
132
|
+
โ โโโ mobile-skills-browser.jpeg # Skills manager from mobile phone
|
|
133
|
+
โโโ ๐ skills/
|
|
134
|
+
โโโ launch-codex-unpacked/
|
|
135
|
+
โโโ SKILL.md # Codex skill definition
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## ๐ `launch_codex_webui_unpacked.sh` โ Browser-Based Codex
|
|
141
|
+
|
|
142
|
+
> **The main event.** Run Codex in your browser. No Electron window needed. Access from any device on your network.
|
|
143
|
+
|
|
144
|
+
### What It Does
|
|
145
|
+
|
|
146
|
+
1. ๐ฆ **Extracts `app.asar`** โ Same unpacking as above
|
|
147
|
+
2. ๐ **Injects WebUI runtime patch** โ Embeds a full HTTP server + WebSocket bridge directly into the Electron main process (~800 lines of runtime injection)
|
|
148
|
+
3. ๐ฉน **Patches renderer bundle** โ Fixes a `roots` guard compatibility issue in the React renderer that crashes in WebUI mode
|
|
149
|
+
4. ๐ **Copies `webui-bridge.js`** โ Installs the browser-side bridge into the webview directory
|
|
150
|
+
5. ๐ **Launches headless Electron** โ Starts with `--webui` flag, hides all native windows, serves UI over HTTP
|
|
151
|
+
6. ๐ **Optional token auth** โ Protect your instance with `--token` for secure remote access
|
|
152
|
+
7. ๐ **Origin allowlist** โ Restrict which domains can connect via `--origins`
|
|
153
|
+
8. ๐ฅ๏ธ **Auto-opens browser** โ Polls the server and opens your default browser when ready
|
|
154
|
+
|
|
155
|
+
### The Injected Runtime Includes
|
|
156
|
+
|
|
157
|
+
- ๐ Full HTTP static file server (serves Codex webview assets)
|
|
158
|
+
- ๐ RFC 6455-compliant WebSocket server (zero dependencies, hand-rolled frame parser)
|
|
159
|
+
- ๐ Timing-safe token authentication (Bearer, header, query param, and cookie)
|
|
160
|
+
- ๐ก๏ธ Security headers (X-Content-Type-Options, X-Frame-Options, CORP, Referrer-Policy)
|
|
161
|
+
- ๐ก IPC-to-WebSocket bridge (intercepts `webContents.send` and mirrors to all connected clients)
|
|
162
|
+
- ๐ฆ Rate limiting (5000 messages/minute for local, configurable)
|
|
163
|
+
- ๐ค Single-client policy (new tab takes over, old tab gets disconnected)
|
|
164
|
+
- ๐ SPA fallback with automatic `webui-bridge.js` injection into HTML
|
|
165
|
+
|
|
166
|
+
### Options
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
--app <path> Custom Codex.app path
|
|
170
|
+
--port <n> WebUI port (default: 5999)
|
|
171
|
+
--token <value> Auth token for secure access ๐
|
|
172
|
+
--origins <csv> Allowed origins (comma-separated)
|
|
173
|
+
--bridge <path> Custom webui-bridge.js path
|
|
174
|
+
--user-data-dir <path> Chromium user data dir override
|
|
175
|
+
--no-open Don't auto-open browser
|
|
176
|
+
--keep-temp Keep extracted app dir
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Examples
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# Basic local access
|
|
183
|
+
./launch_codex_webui_unpacked.sh
|
|
184
|
+
|
|
185
|
+
# Secure remote access with auth
|
|
186
|
+
./launch_codex_webui_unpacked.sh --port 8080 --token mysecrettoken
|
|
187
|
+
|
|
188
|
+
# Access from specific origins only
|
|
189
|
+
./launch_codex_webui_unpacked.sh --origins "https://mysite.com,http://localhost:3000"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## ๐ง `launch_codex_unpacked.sh` โ The SSH Unlocker
|
|
195
|
+
|
|
196
|
+
> **Bonus superpower.** This script extracts, patches, and launches Codex with the hidden SSH remote execution feature fully activated.
|
|
197
|
+
|
|
198
|
+
### What It Does
|
|
199
|
+
|
|
200
|
+
1. ๐ฆ **Extracts `app.asar`** โ Unpacks the Codex Electron bundle into a temp directory using `@electron/asar`
|
|
201
|
+
2. ๐ **Injects SSH host into global state** โ Writes your SSH host into `.codex-global-state.json` so the app recognizes it as a configured remote
|
|
202
|
+
3. ๐งฌ **Patches the main bundle** โ Performs a surgical AST-level patch on the minified `main-*.js` to auto-select the SSH host on startup (finds the startup sequence and rewires it to check `electron-ssh-hosts` first)
|
|
203
|
+
4. ๐ **Enables Node Inspector** โ Launches with `--inspect` for live debugging (port 9229 by default)
|
|
204
|
+
5. ๐ **Enables Chromium Remote Debug** โ Opens `--remote-debugging-port` (9222) for DevTools Protocol access
|
|
205
|
+
6. โ
**SSH preflight check** โ Validates connectivity to your host with `BatchMode=yes` and `ConnectTimeout=6` before launching
|
|
206
|
+
7. ๐งน **Auto-cleanup** โ Temp directory is removed on exit (unless `--keep-temp`)
|
|
207
|
+
|
|
208
|
+
### Options
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
--app <path> Custom Codex.app path (default: /Applications/Codex.app)
|
|
212
|
+
--user-data-dir <path> Chromium user data dir override
|
|
213
|
+
--inspect-port <n> Node inspector port (default: 9229)
|
|
214
|
+
--remote-debug-port <n> Chromium remote debug port (default: 9222)
|
|
215
|
+
--ssh-host <user@host> The SSH host to unlock and auto-connect ๐
|
|
216
|
+
--no-inspect Disable Node inspector
|
|
217
|
+
--no-remote-debug Disable Chromium remote debugging
|
|
218
|
+
--keep-temp Keep extracted app dir for inspection
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Example
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# Unlock SSH to your homelab server with custom ports
|
|
225
|
+
./launch_codex_unpacked.sh \
|
|
226
|
+
--ssh-host ubuntu@192.168.1.100 \
|
|
227
|
+
--inspect-port 9230 \
|
|
228
|
+
--remote-debug-port 9223
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## ๐ `webui-bridge.js` โ The Browser-Side Bridge
|
|
234
|
+
|
|
235
|
+
> **Makes the browser think it's Electron.** Replaces `window.electronBridge` with a WebSocket-backed implementation.
|
|
236
|
+
|
|
237
|
+
### What It Does
|
|
238
|
+
|
|
239
|
+
1. ๐ **Detects environment** โ Only activates when the native Electron preload bridge is absent
|
|
240
|
+
2. ๐ **Establishes WebSocket connection** โ Connects to `/ws` with automatic reconnection (exponential backoff, 500ms โ 5s)
|
|
241
|
+
3. ๐จ **Implements full `electronBridge` API** โ `sendMessageFromView`, `sendWorkerMessageFromView`, `subscribeToWorkerMessages`, and more
|
|
242
|
+
4. ๐ฌ **Message queue** โ Buffers outbound messages while disconnected, flushes on reconnect
|
|
243
|
+
5. ๐ก **Event forwarding** โ Translates WebSocket packets into browser `MessageEvent`s that the React app expects
|
|
244
|
+
6. ๐ **Worker subscription system** โ Manages per-worker callback subscriptions with proper cleanup
|
|
245
|
+
7. ๐ท๏ธ **Session management** โ Emits `client-status-changed` on connect, handles `open-new-instance` redirects
|
|
246
|
+
8. ๐ก๏ธ **Single-socket guard** โ Token-based deduplication prevents ghost connections
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## ๐ฌ How We Found It โ The Investigation
|
|
251
|
+
|
|
252
|
+
> See the full reverse-engineering findings in [`PROJECT_STATE.md` ยง 9](PROJECT_STATE.md#9-ssh-reverse-engineering-findings)
|
|
253
|
+
|
|
254
|
+
We extracted the `app.asar`, deobfuscated the minified bundles, and traced the execution paths. Along the way we discovered a fully-built SSH remote execution engine hidden inside the binary. Here's what we found:
|
|
255
|
+
|
|
256
|
+
| ๐ Discovery | ๐ Detail |
|
|
257
|
+
|---|---|
|
|
258
|
+
| **Remote host detection** | Activates when host config `kind` is `ssh` or `brix` |
|
|
259
|
+
| **Command execution** | Builds args from `hostConfig.terminal_command`, appends `--`, env vars, and command |
|
|
260
|
+
| **SSH wrapper** | Wraps commands in `sh -lc <quoted>` with `-o BatchMode=yes -o ConnectTimeout=10` |
|
|
261
|
+
| **Git over SSH** | Routes git commands through remote shell with `GIT_TERMINAL_PROMPT=0` |
|
|
262
|
+
| **Remote git apply** | Full flow: `mktemp -d` โ `cat > patch` โ `test -e` โ `git apply --3way` โ `rm -rf` |
|
|
263
|
+
| **Codex home resolution** | Checks `$CODEX_HOME`, falls back to `$HOME/.codex` |
|
|
264
|
+
|
|
265
|
+
**All of this was already compiled into the app. We just wired it up.** โก
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## ๐๏ธ Architecture
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
273
|
+
โ YOUR BROWSER โ
|
|
274
|
+
โ โ
|
|
275
|
+
โ webui-bridge.js โ
|
|
276
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
277
|
+
โ โ window.electronBridge (fake) โ โ
|
|
278
|
+
โ โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ
|
|
279
|
+
โ โ โ sendMessage โ โ subscribe โ โ โ
|
|
280
|
+
โ โ โ FromView โ โ ToWorker โ โ โ
|
|
281
|
+
โ โ โโโโโโโโฌโโโโโโ โโโโโโโโฌโโโโโโโ โ โ
|
|
282
|
+
โ โโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโ โ
|
|
283
|
+
โ โ WebSocket โ โ
|
|
284
|
+
โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
285
|
+
โ /ws โ
|
|
286
|
+
โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
287
|
+
โ ELECTRON MAIN PROCESS (headless) โ
|
|
288
|
+
โ โ โ โ
|
|
289
|
+
โ โโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโ โ
|
|
290
|
+
โ โ WebUI Runtime Patch โ โ
|
|
291
|
+
โ โ โโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ
|
|
292
|
+
โ โ โ HTTP โ โ WebSocket โ โ โ
|
|
293
|
+
โ โ โ Server โ โ Server โ โ โ
|
|
294
|
+
โ โ โโโโโโโโโโโโ โโโโโโโโฌโโโโโโโ โ โ
|
|
295
|
+
โ โ โ โ โ
|
|
296
|
+
โ โ webContents.send โโโโ (intercept & mirror) โ
|
|
297
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
298
|
+
โ โ โ
|
|
299
|
+
โ โโโโโโโโโดโโโโโโโโโ โ
|
|
300
|
+
โ โ SSH Transport โ โโโ UNLOCKED ๐ โ
|
|
301
|
+
โ โโโโโโโโโฌโโโโโโโโโ โ
|
|
302
|
+
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
303
|
+
โ SSH
|
|
304
|
+
โโโโโโโโโโดโโโโโโโโโ
|
|
305
|
+
โ REMOTE HOST โ
|
|
306
|
+
โ โโโโโโโโโโโโโโ โ
|
|
307
|
+
โ โ ~/.codex โ โ
|
|
308
|
+
โ โ git apply โ โ
|
|
309
|
+
โ โ sh -lc ... โ โ
|
|
310
|
+
โ โโโโโโโโโโโโโโ โ
|
|
311
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## ๐ฏ Requirements
|
|
317
|
+
|
|
318
|
+
- ๐ **macOS** with Codex Desktop installed (or custom `--app` path)
|
|
319
|
+
- ๐ฆ **Launcher dependencies are auto-installed** when missing:
|
|
320
|
+
- `node`/`npx` (both launchers)
|
|
321
|
+
- `ripgrep` (`launch_codex_webui_unpacked.sh`)
|
|
322
|
+
- via Homebrew bootstrap when `brew` is missing
|
|
323
|
+
- ๐ Internet access and `curl` available for automatic Homebrew/tool installation
|
|
324
|
+
- โ๏ธ Optional: set `AUTO_INSTALL_TOOLS=0` to disable auto-install behavior
|
|
325
|
+
- ๐ **A modern browser** (Chrome, Firefox, Safari, Arc, etc.) for Web UI access
|
|
326
|
+
- ๐ **SSH key-based auth** configured for your target host โ only needed for SSH mode (`BatchMode=yes`)
|
|
327
|
+
- ๐ฅ๏ธ Target host with `~/.codex` directory (or `$CODEX_HOME` set) โ only needed for SSH mode
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## ๐ก๏ธ Security Notes
|
|
332
|
+
|
|
333
|
+
- SSH uses `BatchMode=yes` โ no interactive password prompts, key-based auth only
|
|
334
|
+
- WebUI token auth uses **timing-safe comparison** to prevent timing attacks
|
|
335
|
+
- Security headers are set on all HTTP responses (DENY framing, no-sniff, no-referrer)
|
|
336
|
+
- Single-client policy prevents session hijacking from duplicate tabs
|
|
337
|
+
- Rate limiting protects against WebSocket flood attacks
|
|
338
|
+
- No `StrictHostKeyChecking` overrides โ your existing SSH config is respected
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## ๐ Troubleshooting
|
|
343
|
+
|
|
344
|
+
| Problem | Solution |
|
|
345
|
+
|---|---|
|
|
346
|
+
| `EADDRINUSE` | Port already in use โ try `--port 6002` |
|
|
347
|
+
| `SSH preflight failed` | Check your SSH key: `ssh -o BatchMode=yes user@host 'echo ok'` |
|
|
348
|
+
| `Renderer guard patch anchor not found` | Bundle version changed โ open an issue |
|
|
349
|
+
| `Missing app.asar` | Point `--app` to your Codex.app location |
|
|
350
|
+
| Blank page in WebUI | Check console for `roots` error โ renderer patch may need updating |
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## ๐ค Contributing
|
|
355
|
+
|
|
356
|
+
Found a new Codex version that breaks the patches? Bundle patterns change between releases โ [PRs](https://github.com/friuns2/codex-unpacked-toolkit/pulls) to update the patch anchors are always welcome! [Open an issue](https://github.com/friuns2/codex-unpacked-toolkit/issues) if you hit a new bundle shape.
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## โญ Star This Repo
|
|
361
|
+
|
|
362
|
+
If you think Codex should be accessible **from any browser, on any device** โ not just the Electron window it shipped in โ [smash that star button](https://github.com/friuns2/codex-unpacked-toolkit). โญ
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
<div align="center">
|
|
367
|
+
|
|
368
|
+
**Built by reverse-engineering Codex Desktop's Electron bundle** ๐ฌ
|
|
369
|
+
|
|
370
|
+
*Because the best features are the ones they already shipped but forgot to turn on.* ๐
|
|
371
|
+
|
|
372
|
+
</div>
|
package/bin/codex-web-ui
ADDED