M13.6: gitway --proxy-command + -J --jump-host (anvil-ssh 0.4.0)#22
Merged
Conversation
Picks up anvil-ssh 0.4.0 and wires the new connect_via_proxy_command
+ connect_via_jump_hosts entry points into the gitway CLI.
Cargo.toml: anvil-ssh 0.3.1 -> 0.4.0.
Cargo.lock: cargo update -p anvil-ssh.
cli.rs:
- Two new flags on the global Cli:
--proxy-command "<COMMAND>" — overrides ssh_config ProxyCommand
for this connection. Pass `none`
to disable a config-supplied one
(FR-59).
-J / --jump-host "[USER@]HOST[:PORT]"
— repeatable; matches OpenSSH's
-J. Multiple flags build a chain
of up to MAX_JUMP_HOPS = 8.
main.rs:
- New helper resolve_proxy_directives(&cli, resolved) returns the
EFFECTIVE (proxy_command, jump_chain) tuple per the precedence
CLI > ssh_config > none. Single `none` entry clears the chain
(FR-59).
- New helper connect_session(config, alias, proxy, jump_hosts)
dispatches to the right AnvilSession constructor:
1. ProxyCommand (excluding `none`) wins over everything else.
2. ProxyJump wins over direct TCP when non-empty.
3. Otherwise plain AnvilSession::connect.
- run() captures the user-typed alias (raw_host, before HostName
resolution) and threads it into run_test / run_exec for the
ProxyCommand `%n` token.
- run_test and run_exec route through connect_session instead of
AnvilSession::connect directly. No behavior change when no proxy is
set; FR-55 / FR-56 / FR-59 paths fire when configured.
config.rs:
- gitway config show now parses ProxyJump and emits one
`proxyjump_hop_<n>_to <user@host:port>` line per hop in human
output (FR-58).
- JSON output gains a `proxy_jump_chain: [{host,port,user}, ...]`
field. Null when no chain or unparsable.
run_schema / run_describe:
- Advertise --proxy-command and --jump-host as global flags so agent
tooling can discover them.
Tests: workspace tests still green; 4 + 7 + integration tests pass.
Smoke-tested locally with a Host block declaring
`ProxyJump alice@bastion1:2222,bastion2`; config show emits both
hops in JSON proxy_jump_chain with correct port defaults and user
fallback.
Plan: M13.6 of let-us-plan-on-bright-cosmos.md.
2 tasks
UnbreakableMJ
added a commit
that referenced
this pull request
May 4, 2026
…able (#23) Mirrors the M11.5/M12 done-style applied in PRs #18 and #21: - §7.4 release-line table: 0.4.0 shipped 2026-05-04 with §5.8.2 proxy chapter; 0.5.0+ reserved for M14+. - §8 milestones table: M13 row now Done with a digest of the seven Anvil PRs (#5, #6, #10, #11, #12, #13, #14), the Gitway PR (#22), the Gitway tag (v1.0.0-rc.4), and the explicit NFR-17 + NFR-16 call-outs (independent per-hop verification, loopback ratio gate, real-RTT manual). Plan: M13.X of let-us-plan-on-bright-cosmos.md.
2 tasks
UnbreakableMJ
added a commit
that referenced
this pull request
May 4, 2026
…ease-line table (#31) Updates the canonical PRD to reflect the M19 release shipped as anvil-ssh 0.7.0 (Anvil PRs #22, #23, #24) + Gitway PRs #29, #30 + Gitway tag v1.0.0-rc.7. Two changes: 1. §7.4 release-line table — splits the prior `0.7.0–0.9.0 ⏳` row into a `0.7.0 ✅ Shipped` row covering the M19 release and a narrower `0.8.0–0.9.0 ⏳ In progress (M16–M18)` row. The 0.7.0 row records the new HashedHost parser+matcher, the write-side helpers (append_known_host_hashed / prepend_revoked / all_embedded / HashMode + detect_hash_mode), the visibility promotions, and the new direct deps (hmac/sha1/base64). 2. §8 milestone table — flips the M19 row from ⏳ Planned to ✅ Done 2026-05-04. Records the full FR-84..FR-87 deliverable: - Anvil-side parser + writer surface - Gitway-side three-verb hosts subcommand - HMAC-SHA1 privacy-only documentation - Three Anvil PRs and two Gitway PRs - v1.0.0-rc.7 tag §10 risks unchanged — M19 introduced no new risks. Plan: M19.X of anvil-gitway-milestone-plan.md. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Picks up anvil-ssh 0.4.0 and wires the new
connect_via_proxy_command+connect_via_jump_hostsentry points into the gitway CLI.Companion Anvil PRs already merged + 0.4.0 published:
What's new
--proxy-command <COMMAND>(FR-55) — overridesProxyCommandfromssh_config(5). Passnoneto disable a config-supplied template (FR-59).-J/--jump-host [USER@]HOST[:PORT](FR-56) — repeatable; matches OpenSSH-J. Builds a chain of up toMAX_JUMP_HOPS = 8.--jump-host=nonedisables a config-supplied chain.connect_session(config, alias, proxy, jump_hosts)picks the rightAnvilSession::connect_via_*based on effective state. Precedence: CLI > ssh_config > direct TCP.gitway config showchain visualization (FR-58) — whenproxy_jumpis set, the human output emits oneproxyjump_hop_<n>_to user@host:portline per hop; JSON gains aproxy_jump_chain: [{host,port,user},...]array.Smoke test
ext $ gitway --no-color config show work --user-config <fixture> hostname work.example.com user worker proxyjump alice@bastion1.example.com:2222,bastion2.example.com proxyjump_hop_1_to alice@bastion1.example.com:2222 proxyjump_hop_2_to bastion2.example.com:22JSON output (excerpt):
json proxy_jump_chain: [ {host: bastion1.example.com, port: 2222, user: alice}, {host: bastion2.example.com, port: 22, user: null} ]Tag plan
After merge: tag
v1.0.0-rc.4.Test plan
cargo fmt/cargo clippy --workspace -- -D warningsclean.cargo test --workspace --lockedgreen.gitway config show <host>with aProxyJumpchain renders all hops.gitway -J bastion target ...actually opens a 2-hop session (verified by M13.7 integration harness — separate PR).Plan: M13.6 of let-us-plan-on-bright-cosmos.md.
🤖 Generated with Claude Code