How geph-official/gephgui-wry works
Project type and purpose
• gephgui-wry is a cross-platform desktop GUI application built in Rust, hosting a local HTML/JS frontend (the gephgui submodule) inside a Wry (WebView) window. Its job is to provide a user interface for controlling the Geph VPN daemon, handling updates, configuration (PAC files), and IPC between the UI and system services.
File structure
• Top level:
• Cargo.toml, Cargo.lock, build.rs → Rust project configuration and build script.
• .cargo/config → Cargo build configuration.
• gephgui/ → git submodule containing the HTML/JavaScript frontend.
• src/:
• main.rs → sets up the Wry window, loads the static assets, registers RPC handlers.
• rpc.rs → defines the Rust side of the RPC/API exposed to JS.
• daemon.rs → logic for launching, monitoring, and communicating with the Geph VPN daemon process.
• autoupdate.rs → self-update logic (checking for new versions, downloading, restarting).
• pac.rs → generates or serves the PAC (Proxy Auto-Configuration) file.
• mtbus.rs → message bus abstraction within Rust for internal event distribution.
• fakefs.rs → virtual filesystem layer to map/serve static assets to the WebView.
• init.js → injected script to bootstrap the JS side of the RPC API.
• linux-start-vpn.sh → Linux-specific VPN startup helper.
README for additional insights
• Confirms the dual nature: Rust “host” application + HTML/JS “gephgui” frontend.
• Dependency on Wry for the WebView (cross-platform).
• Build steps: compile frontend, then cargo install the Rust wrapper.