Enclave Gateway (abbreviated egw) is an open-source command-line tool designed to help users access target nodes from macOS (Apple Silicon or Intel), Linux, or Windows hosts through an isolated Windows VPN appliance and an RDP bastion host (Bastion, TCP 3389). Even if the bastion host's inbound SSH port is closed, egw can establish a channel via RDP's drive redirection capability.
Main capabilities include:
- Support for Windows VPN appliances under QEMU HVF/KVM/WHPX virtualization, or direct use of an existing Windows host (Direct mode).
- Built-in adapters for 6 VPN providers: vipnet, kontinent, anyconnect, openvpn, wireguard, and custom, which can detect the architecture, signature, and version of installed binaries.
- Transactional file transfer via the RDP virtual file system ([MS-RDPEFS]), supporting parallel striped I/O, SHA-256 verification, and optional zlib compression, without installing a custom virtual channel DLL.
- Provision of multi-hop SSH, SOCKS5 proxy (RFC 1928), port forwarding, OpenSSH ProxyCommand integration, and layered diagnostics (egw doctor, heal).
- Governed MCP server (stdio and HTTP), supporting role/tool/node/path policies, and including DestructiveCommandGuard command checks, SecretScrubber secret filtering, and FlightRecorder hash-chain auditing.
Usage: requires Python 3.10+, a Windows appliance with a configured QGA channel, working VPN/RDP routing, PowerShell FullLanguage, and an OpenSSH client on the bastion host. After installing via pip, use the egw command to perform various operations, such as egw exec, egw cp, egw sync, egw ssh, egw socks5, egw forward, egw mcp, etc. On first use, initialize the configuration (egw config init), and run the command generated by agents stage in the bastion session to start the worker process.
Applicable scenarios: operations, development, or security teams that need secure access to isolated networks (such as corporate intranets, controlled environments), especially suitable for environments where inbound SSH is restricted but RDP is available.
Limitations: does not bundle proprietary VPN installers, licenses, credentials, or images; requires organization-approved VPN clients and RDP routing; command checks and secret filtering cannot identify all possible shell effects or secrets; transfer compatibility and latency need to be verified in actual deployments; enterprise mode requires signing and authentication, and missing requirements will fail closed. The current version 0.4.0 is in Standard operator mode, and some field tests (such as 128 MiB round-trip and RDP reconnection) are still in progress.