Compare commits
2
Commits
9a4ab4af96
...
v0.6.0_5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7c2a6a58a | ||
|
|
59594d46bc |
No files matched your search
@@ -34,7 +34,13 @@ verified, tried, and decided belongs in the commit message and the PR body.
|
||||
|
||||
## This repo
|
||||
|
||||
- **This is a fork, and upstream is a moving target.** `packageRepo` points at `sondreolav/ppq-private-mode-startos`; upstream is `Start9-Community/ppq-private-mode-startos`. Take upstream changes with `git merge upstream/main` — never by hand-copying files. A hand-copy leaves upstream's commits outside our history, so GitHub keeps reporting the fork as *N commits behind*, and the gap grows with every upstream release.
|
||||
- **The package version tracks the vendored proxy, not upstream's wrapper version.** `version` in `startos/versions/current.ts` follows `ppq-private-mode-proxy/package.json` (currently `0.6.0`), while upstream's wrapper sits on its own `0.4.x` line. That makes `current.ts` a conflict on every upstream merge: keep our version, bump the revision (`0.6.0:5`), and write our own release notes.
|
||||
- **Don't merge `upstream/next`.** `main` is the released line — upstream's `v0.4.1_1` tag sits on it. Our own tags use the same shape: `v0.6.0_5`, with an underscore because git refs cannot contain `:`.
|
||||
- **`PPQ_ALLOWED_HOSTS` is derived from the binding's own addresses.** Never hardcode hostnames; `main.ts` resolves them reactively, so an address added later is picked up on the next restart.
|
||||
- **Put package-owned settings in `store.json`, never in `config.json`** — the proxy rewrites `config.json` whole when a key is saved on the Status Page.
|
||||
- **Don't set `PPQ_API_KEY`** — the proxy's own key store must stay the key's only owner, so the action and the Status Page write the same key.
|
||||
- **A blank key field keeps the saved key; don't "fix" it to clear on empty** — it is how the action toggles logging without re-entering the key.
|
||||
- **The key pattern is validated in the action** because upstream only validates on the Status Page — a malformed key written straight to `config.json` surfaces later as a 401 on the first request.
|
||||
- **The task is `important`, not `critical`, on purpose.** A `critical` task suspends the ordinary controls, which would stop the user starting the service — and the Status Page is the other place a key can be saved.
|
||||
- **Default branch is `main`, not `master`.** Keep `main` in every workflow when resyncing them from the template.
|
||||
@@ -24,11 +24,12 @@ Forked from [Start9-Community/ppq-private-mode-startos](https://github.com/Start
|
||||
- **DNS-rebinding hardening (default on).** StartOS now sets `PPQ_ALLOWED_HOSTS` automatically to the exact hostnames the API interface is served on (LAN IP, `.local`, private/public domains, the bridge address and loopback). A hostile web page can no longer reach the proxy as "same-origin" or overwrite the stored API key via `/setup/api-key`. The list is resolved reactively, so adding a domain later is picked up on the next restart.
|
||||
- **New action — Service-to-Service URL.** Resolves the internal LXC-bridge address and prints the `http://<bridge-ip>:<port>/v1` base URL that Open WebUI (or any service container on this same StartOS server) should dial — plain HTTP, no TLS or cert handling. This is what an on-box client must use instead of the LAN `https://` address, which fails certificate validation inside another container's runtime.
|
||||
- **Key validation matches upstream.** `configureApiKey` uses the exact same API-key shape check as upstream v0.6.0 (`^sk-[A-Za-z0-9]{16,64}$`), so a key accepted in StartOS is never rejected later by the proxy itself.
|
||||
- **No glוןouble restart on configure.** The action only writes settings that actually changed (both `debug` and the API key are compared against the stored value first), so toggling logging or replacing the key restarts the service once — and only when something really changed.
|
||||
- **No double restart on configure.** The action only writes settings that actually changed (both `debug` and the API key are compared against the stored value first), so toggling logging or replacing the key restarts the service once — and only when something really changed.
|
||||
- **Stable consumer contract.** `startos/utils.ts` exports `apiHostId` (`'main'`) and `apiPort` (`8787`) for dependents to import, mirroring the pattern Open WebUI already uses for its other AI backends.
|
||||
- **Docs.** `README.md` and `instructions.md` document the same-server / Open WebUI connection flow and updated models.
|
||||
- **Toolchain rebased onto upstream's SDK migration.** This fork now builds with start-sdk 3.0.3: file models use `z.looseObject`, the manifest and init take an `sdk.Dependencies.of()` builder, and the toolchain scripts and devDependencies come from the SDK rather than `package.json`.
|
||||
|
||||
Version: `0.6.0:4`, built with SDK 2.0.9.
|
||||
Version: `0.6.0:5`, built with SDK 3.0.3.
|
||||
|
||||
---
|
||||
|
||||
@@ -141,6 +142,7 @@ Sets the API key and the verbose-logging switch.
|
||||
- **Cost:** the service restarts, since the proxy reads its config at start.
|
||||
- **Repeat safety:** idempotent. **Leaving the key blank keeps the existing one** rather than clearing it, so the action can be used to toggle logging without re-entering the key.
|
||||
- **The key is never echoed back into the form.** The logging toggle is pre-filled; the key is not.
|
||||
- **Verbose logging** adds model information for accepted chat requests and logs OpenAI stream errors. Error messages may include sensitive content, even when verbose logging is off.
|
||||
- **The key's shape is checked before it is written**, with the exact same pattern upstream v0.6.0 uses (`^sk-[A-Za-z0-9]{16,64}$`) — so a key accepted here is never rejected later by the proxy's own status-page endpoint.
|
||||
- **Only changed settings are written.** Each value (`debug`, `apiKey`) is compared against the stored value first; nothing is written when it did not change, so no spurious restarts.
|
||||
|
||||
@@ -197,6 +199,7 @@ A restored instance comes back with the same key and works immediately, since no
|
||||
8. **Same-server clients must use the bridge address, not the LAN `https://` URL** — see [Network Access and Interfaces](#network-access-and-interfaces).
|
||||
9. **Known SDK listener warning (accepted).** `main` reads the files reactively with `.const()` — necessary so a key saved on the Status Page clears the setup task. That hits the known Start9 SDK pattern around `FileHelper.produce` that can emit a cosmetic `MaxListenersExceededWarning` (start9labs/start-technologies#3182). It is library-side and cosmetic; the reactive reads are required, so we deliberately do not "fix" it.
|
||||
10. **Upstream request bodies are unbounded (accepted, documented).** Upstream v0.6.0 does not cap HTTP request-body size, so a client that can reach the API could spend memory with very large POSTs (a potential DoS). This is upstream code — this wrapper cannot fix it without forking the proxy — so the mitigation is to keep the API interface private (LAN/VPN/Tor) and never expose it on the public internet. The interface is unauthenticated anyway (see #3), so it should never be publicly reachable.
|
||||
11. **Upstream logs error messages unsanitized.** A `JSON.parse` failure quotes an excerpt of the request body, and caught errors are logged regardless of the Verbose Logging switch — so logs can contain prompt content. Review logs before sharing them.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user