<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: roth xu</title>
    <description>The latest articles on DEV Community by roth xu (@roth_xu_cd62f22027a86d2a6).</description>
    <link>https://dev.to/roth_xu_cd62f22027a86d2a6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4276102%2F20a36ba9-1332-4eef-b047-8e7dfd16a331.png</url>
      <title>DEV Community: roth xu</title>
      <link>https://dev.to/roth_xu_cd62f22027a86d2a6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/roth_xu_cd62f22027a86d2a6"/>
    <language>en</language>
    <item>
      <title>Why I Refused to Touch /etc/environment: Building a Zero-Pollution Network Sandbox with Kiro for Kiroween 2026</title>
      <dc:creator>roth xu</dc:creator>
      <pubDate>Tue, 01 Dec 2026 10:03:02 +0000</pubDate>
      <link>https://dev.to/roth_xu_cd62f22027a86d2a6/why-i-refused-to-touch-etcenvironment-building-a-zero-pollution-network-sandbox-with-kiro-for-2do2</link>
      <guid>https://dev.to/roth_xu_cd62f22027a86d2a6/why-i-refused-to-touch-etcenvironment-building-a-zero-pollution-network-sandbox-with-kiro-for-2do2</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is written as part of the **Kiroween 2026 hackathon&lt;/em&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every developer working across local workstations, remote Linux servers, and Docker containers has hit the same wall: you need one command or one GPU worker to reach the internet through an HTTP proxy, so someone pastes &lt;code&gt;export http_proxy=...&lt;/code&gt; into &lt;code&gt;~/.bashrc&lt;/code&gt; or &lt;code&gt;/etc/environment&lt;/code&gt;. Five minutes later, local healthchecks break, internal services route through the wrong hop, and nobody remembers what the original shell environment looked like before the edit.&lt;/p&gt;

&lt;p&gt;For the &lt;strong&gt;Kiroween 2026&lt;/strong&gt; Frankenstein track, I built &lt;strong&gt;&lt;a href="https://github.com/xuarehere/net-proxy-tool" rel="noopener noreferrer"&gt;net-proxy-tool&lt;/a&gt;&lt;/strong&gt;—a pure Python 3 standard-library network sandbox orchestrator that stitches together a local loopback observation gateway, isolated single-command/Python proxy execution, verified SSH &amp;amp; Docker node management, and a read-only MCP server for AI agents.&lt;/p&gt;

&lt;p&gt;Instead of "vibe coding" a fragile wrapper script, I used &lt;strong&gt;Kiro&lt;/strong&gt; as an architectural guardrail from day one. Here is what actually changed in how I built it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Live Demo Video (2 Minutes)
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/86NiKtuWgqs" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Direct link: &lt;a href="https://youtu.be/86NiKtuWgqs" rel="noopener noreferrer"&gt;Watch the walkthrough on YouTube&lt;/a&gt; · &lt;a href="https://net-proxy-tool-demo.onrender.com" rel="noopener noreferrer"&gt;Try the Zero-Install Live Web Sandbox&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Specs &amp;amp; Steering as Non-Negotiable Contracts
&lt;/h2&gt;

&lt;p&gt;The hardest part of infrastructure tooling isn't the happy path—it's making sure the &lt;em&gt;off&lt;/em&gt; switch truly restores what was there before.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5rwrez0rvktnk2cfw9v7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5rwrez0rvktnk2cfw9v7.png" alt="net-proxy-tool Web Console — Setup Wizard and Local Observation Gateway" width="800" height="549"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inside &lt;a href="https://github.com/xuarehere/net-proxy-tool/tree/main/.kiro" rel="noopener noreferrer"&gt;&lt;code&gt;.kiro/&lt;/code&gt;&lt;/a&gt;, I maintained &lt;strong&gt;12 EARS specifications&lt;/strong&gt;, &lt;strong&gt;10 steering files&lt;/strong&gt;, &lt;strong&gt;8 agent hooks&lt;/strong&gt;, and a dedicated &lt;strong&gt;&lt;code&gt;egress-diagnostician&lt;/code&gt;&lt;/strong&gt; custom agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero-dependency constraint (&lt;code&gt;.kiro/hooks/stdlib-only.json&lt;/code&gt;)&lt;/strong&gt;: Every time a module was edited, Kiro's hook reminded the workflow that &lt;code&gt;net-proxy-tool&lt;/code&gt; runtime must import &lt;strong&gt;zero third-party pip packages&lt;/strong&gt;. That constraint made it possible to ship self-contained portable builds across &lt;strong&gt;5 platforms&lt;/strong&gt; (Windows x64, macOS Apple Silicon/Intel, Linux x64/ARM64) in &lt;code&gt;v1.5.1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reversible Baseline Contract (&lt;code&gt;.kiro/specs/node-off-restoration/&lt;/code&gt;)&lt;/strong&gt;: Before enabling a managed proxy on a remote Linux user or Docker container, the tool snapshots the login shell baseline and owner tag. Disabling the proxy does not just delete lines—it verifies in a fresh login shell that the residual proxy variables match the pre-enable baseline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paired Bilingual Documentation (&lt;code&gt;.kiro/hooks/docs-pair.json&lt;/code&gt;)&lt;/strong&gt;: Kept English and Simplified Chinese UI/docs synchronized (&lt;code&gt;EN | 中文&lt;/code&gt;) without raw untranslated strings leaking into static HTML.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Stitching Frankenstein Pieces Together with MCP + PBT
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxp1qo4j37k1bkfse2d5n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxp1qo4j37k1bkfse2d5n.png" alt="net-proxy-tool Architecture — Local Observation Gateway, SSH, Docker, and MCP" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To qualify for the &lt;strong&gt;Frankenstein&lt;/strong&gt; spirit, the pieces had to talk to each other cleanly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Local Observation Gateway (&lt;code&gt;web/local_gateway.py&lt;/code&gt;)&lt;/strong&gt;: A built-in loopback HTTP CONNECT/GET proxy so first-time users can click &lt;strong&gt;"Try it now"&lt;/strong&gt; with zero external proxy setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dual-Path Verification&lt;/strong&gt;: Instead of guessing whether a node actually used the proxy, &lt;code&gt;net-proxy-tool&lt;/code&gt; compares an ordinary request against an explicit-proxy request and checks the observed peer IP/port.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read-Only MCP Server (&lt;code&gt;net_proxy_mcp.py&lt;/code&gt;)&lt;/strong&gt;: Exposes gateways, node states, and safe diagnostics over stdio Model Context Protocol so coding agents inside Kiro can inspect egress health without mutating operator config.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Property-Based Testing with Hypothesis&lt;/strong&gt;: Kiro helped translate spec invariants into property tests (&lt;code&gt;test_prop_*.py&lt;/code&gt;) covering secret redaction, host/origin hardening, local gateway safety, and MCP lifecycle behavior—bringing the suite to nearly 300 automated checks.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  3. Try It Yourself
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Zero-Install Web Demo&lt;/strong&gt;: &lt;a href="https://net-proxy-tool-demo.onrender.com" rel="noopener noreferrer"&gt;https://net-proxy-tool-demo.onrender.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public GitHub Repo&lt;/strong&gt;: &lt;a href="https://github.com/xuarehere/net-proxy-tool" rel="noopener noreferrer"&gt;https://github.com/xuarehere/net-proxy-tool&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5-Platform Portable Releases (&lt;code&gt;v1.5.1&lt;/code&gt;)&lt;/strong&gt;: &lt;a href="https://github.com/xuarehere/net-proxy-tool/releases/tag/v1.5.1" rel="noopener noreferrer"&gt;https://github.com/xuarehere/net-proxy-tool/releases/tag/v1.5.1&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Devpost Submission&lt;/strong&gt;: &lt;a href="https://devpost.com/software/kiro-spec-first-engineering-agent" rel="noopener noreferrer"&gt;https://devpost.com/software/kiro-spec-first-engineering-agent&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Building with Kiro's spec-first loop (Requirements → Design → Property Invariants → Hooks) turned a messy cross-OS shell problem into something I actually trust on my own machines.&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>kiroween</category>
      <category>python</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
