Streamline the dev proxy guide to match the ts CLI install#892
Merged
Conversation
Replace the verbose `cargo run --manifest-path … --target … -- dev proxy` invocations with the installed `ts` binary (via `cargo install-cli`), so the guide reads the same way as the CLI guide. Note that `ts dev proxy` is macOS-only and phrase the install step as "install or update". Make the quick start a complete first run (`ca install`, then run with `--rewrite-host` and `--launch chrome`), and make `--rewrite-host` the recommended default for dev and staging upstreams. The Host-header guidance now turns on whether the upstream accepts `Host: <FROM>` rather than on the upstream being Trusted Server Compute. Correct several stale or wrong examples, verified against the CLI source: - Firefox `certutil` now uses `-d "sql:…"` and the full CA nickname, matching the auto-import the tool performs. - Add the missing `--connect-timeout` option and note that `[COMMAND]` is `ca`. - Prefer `--basic-auth-file` over inline `--basic-auth` in the staging example. - Clarify the CA key is stored outside the repository only by default, and rename "First run: CA setup" to "The development CA".
Keep `--rewrite-host` in the quick start (it is required for upstreams that reject `Host: <FROM>`), but state its trade-off honestly: against a real Trusted Server adapter, first-party URLs then render on the upstream host, not the production domain. Qualify the "first-party URLs always stay on the production domain" claim accordingly — it holds only when the upstream preserves `X-Forwarded-Host`. Also: - Note that Firefox CA auto-import needs `certutil` (`brew install nss`) and qualify the troubleshooting row that assumed it is always present. - State that `--launch` opens only the first mapped hostname while every mapping is still proxied. - Note that connection options (`--rewrite-host`, auth, `--insecure`, `--upstream-plaintext`) apply to every mapping, not per-rule. - Scope the Safari "only while the proxy runs" claim to a clean exit.
ChristianPavilonis
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Streamline
docs/guide/ts-dev-proxy.mdso it uses the installedtsbinarythroughout — matching the CLI guide — and correct several examples
that did not match the CLI's actual behavior. Every command and option was checked
against
crates/trusted-server-cli.What changed
Install & invocation
cargo run --manifest-path … --target … -- dev proxycallswith the installed
tsbinary (cargo install-cli).ts dev proxyis macOS-only; phrase the step as "install or update".ca install→ run →--launch chrome.--rewrite-hostguidance--rewrite-hostas the default for dev/staging upstreams (they rejectHost: <FROM>), but state its trade-off honestly: against a real Trusted Serveradapter, first-party URLs render on the upstream host. To keep them on the
production domain, use an upstream that accepts
Host: <FROM>and omit the flag.holds only when the upstream preserves
X-Forwarded-Host.Correctness fixes (verified against the CLI source)
certutil: add thesql:NSS prefix and the full CA nickname, matchingthe tool's own auto-import; note
certutilneedsbrew install nss.--connect-timeout <SECONDS> [default: 10]and note that[COMMAND]is thecasubcommand.--launchopens only the first mapped hostname; connection options apply toevery mapping, not per-rule.
--basic-auth-filein the staging example; scope Safari's "only whilerunning" to a clean exit; clarify the CA key is outside the repo by default;
rename "First run: CA setup" to "The development CA".
Verification
cd docs && npx prettier --check guide/ts-dev-proxy.mdpasses.Follow-up
prerequisites → install → trust → first-run flow.