Skip to content

Commit 8087f15

Browse files
chore: remove proxy subcommand (#195) (#198)
The proxy subcommand is obsolete now that MCPG handles network routing. - Delete src/proxy.rs and tests/proxy_tests.rs - Remove Commands::Proxy variant and match arm from main.rs - Remove mod proxy declaration and unused log::debug import - Remove proxy CLI docs from README.md and AGENTS.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 74f9bb0 commit 8087f15

5 files changed

Lines changed: 0 additions & 933 deletions

File tree

AGENTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Alongside the correctly generated pipeline yaml, an agent file is generated from
3535
│ ├── configure.rs # `configure` CLI command — detects and updates pipeline variables
3636
│ ├── detect.rs # Agentic pipeline detection (helper for `configure`)
3737
│ ├── ndjson.rs # NDJSON parsing utilities
38-
│ ├── proxy.rs # Network proxy implementation
3938
│ ├── sanitize.rs # Input sanitization for safe outputs
4039
│ ├── safeoutputs/ # Safe-output MCP tool implementations (Stage 1 → NDJSON → Stage 2)
4140
│ │ ├── mod.rs

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,6 @@ Commands:
405405
mcp Run as an MCP server (safe outputs)
406406
mcp-http Run as an HTTP MCP server (for MCPG integration)
407407
execute Execute safe outputs (Stage 2)
408-
proxy Start an HTTP proxy for network filtering
409408
configure Detect agentic pipelines and update GITHUB_TOKEN on ADO definitions
410409

411410
Options:

src/main.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ mod init;
88
mod logging;
99
mod mcp;
1010
mod ndjson;
11-
mod proxy;
1211
pub mod sanitize;
1312
mod safeoutputs;
1413
mod tools;
1514

1615
use anyhow::{Context, Result};
1716
use clap::{Parser, Subcommand};
18-
use log::debug;
1917
use std::path::PathBuf;
2018

2119
use crate::safeoutputs::ExecutionContext;
@@ -64,12 +62,6 @@ enum Commands {
6462
#[arg(long)]
6563
ado_project: Option<String>,
6664
},
67-
/// Start an HTTP proxy for network filtering
68-
Proxy {
69-
/// Allowed hosts (can be specified multiple times, supports wildcards like *.github.com)
70-
#[arg(long = "allow")]
71-
allowed_hosts: Vec<String>,
72-
},
7365
/// Run SafeOutputs MCP server over HTTP (for MCPG integration)
7466
McpHttp {
7567
/// Port to listen on
@@ -144,7 +136,6 @@ async fn main() -> Result<()> {
144136
Some(Commands::Check { .. }) => "check",
145137
Some(Commands::Mcp { .. }) => "mcp",
146138
Some(Commands::Execute { .. }) => "execute",
147-
Some(Commands::Proxy { .. }) => "proxy",
148139
Some(Commands::McpHttp { .. }) => "mcp-http",
149140
Some(Commands::Init { .. }) => "init",
150141
Some(Commands::Configure { .. }) => "configure",
@@ -275,23 +266,6 @@ async fn main() -> Result<()> {
275266
std::process::exit(2);
276267
}
277268
}
278-
Commands::Proxy { allowed_hosts } => {
279-
// NetworkPolicy::new() includes default hosts plus any user-specified additional hosts
280-
let policy = proxy::NetworkPolicy::new(allowed_hosts);
281-
282-
// start_proxy prints the port and flushes stdout before spawning the listener
283-
let _port = proxy::start_proxy(policy).await?;
284-
285-
debug!("Proxy started, waiting for termination signal");
286-
287-
// Keep running until terminated - the shell backgrounds this process
288-
// and captures the PID for cleanup
289-
#[cfg(unix)]
290-
tokio::signal::ctrl_c().await?;
291-
292-
#[cfg(windows)]
293-
std::future::pending::<()>().await;
294-
}
295269
Commands::McpHttp {
296270
port,
297271
api_key,

0 commit comments

Comments
 (0)