Directory Layout
Core Application Files
main.js
Location:/main.js (root directory)
Purpose: Electron main process - the Node.js backend of the application
Key Responsibilities:
Window Management
Window Management
- Creates and manages the main BrowserWindow
- Handles window lifecycle events (closed, destroyed)
- Sets application icon and dock icon (macOS)
- Configures window size, resizing, and web preferences
main.js:192-238 for window creation logic.IPC Handlers
IPC Handlers
- Registers IPC event listeners for renderer communication
- Handles commands: start-vpn, stop-vpn, save-settings
- Sends status updates and logs to renderer
- Manages bidirectional communication channel
ipcMain.handle() and ipcMain.on().SlipStream Client Management
SlipStream Client Management
- Spawns native binary as child process
- Platform-specific binary path resolution
- Monitors stdout/stderr for logs and errors
- Handles process exit and cleanup
- Automatic execute permission setting (Unix)
main.js:240-398 for process management.HTTP Proxy Server
HTTP Proxy Server
- Implements HTTP/HTTPS proxy on port 8080
- Handles CONNECT method for HTTPS tunneling
- Routes requests through SOCKS5 client
- Request/response logging and error handling
main.js:405-600 for proxy implementation.System Proxy Configuration
System Proxy Configuration
- macOS: Uses
networksetupcommand - Windows: Configures WinINET + WinHTTP via PowerShell
- Linux: Uses
gsettingsfor GNOME - Saves previous settings for restoration
- Supports bypass/split-tunneling lists
main.js:780-920 for system proxy logic.- Lines 1-163: Imports, constants, settings management
- Lines 165-238: Window creation and lifecycle
- Lines 240-398: SlipStream client spawning
- Lines 405-700: HTTP proxy server implementation
- Lines 780-920: System proxy configuration
index.html
Location:/index.html (root directory)
Purpose: Renderer process - the UI and frontend of the application
Structure:
Theme System
CSS custom properties for light/dark themes (lines 8-80)
Status Card
Connection status indicator with animated orb (lines 276-350)
Controls
Start/Stop buttons, settings inputs, workspace management (lines 400-800)
Logs Panel
Real-time log display with auto-scroll and filtering (lines 133-140)
Modals
Settings, DNS configuration, intro screens (throughout)
IPC Communication
Event listeners for main process messages (in script section)
- Inline CSS using CSS custom properties
- Theme-aware color system
- Responsive layout with flexbox
- Modern UI with shadows, rounded corners, smooth transitions
- Direct Node.js integration (
require('electron')) - IPC communication with main process
- UI state management
- Event handlers for user interactions
package.json
Location:/package.json (root directory)
Key Sections:
The
electron-builder configuration is also in package.json, specifying build targets, icons, and resource packaging.Supporting Files
check-system-proxy.js
Purpose: Standalone utility to check current system proxy settings Usage: Run withnode check-system-proxy.js to see:
- Whether system proxy is enabled
- Current proxy server and port
- Bypass list configuration
tun-manager.js
Purpose: Legacy TUN interface management (not currently used) Status: Retained for potential future TUN mode implementationAssets and Resources
Application Icon
Location:/assets/icon.png
Specifications:
- Format: PNG
- Size: 1024x1024 pixels
- Used for app icon, dock icon (macOS), taskbar icon (Windows)
electron-builderautomatically generates icon files for each platform- macOS: Creates .icns file
- Windows: Creates .ico file
- Linux: Uses PNG directly
Intro Modal Image
Location:/intro.png (root directory)
Purpose: Displayed in the first-run introduction modal
Binaries Directory
Native SlipStream Clients
Location:/binaries/
Required Files:
| File | Platform | Architecture |
|---|---|---|
slipstream-client-mac-arm64 | macOS | Apple Silicon (M1/M2/M3) |
slipstream-client-mac-intel | macOS | Intel x86_64 |
slipstream-client-linux | Linux | x86_64 |
slipstream-client-win.exe | Windows | x86_64 |
These binaries must be present for the build process to succeed. They are packaged into the final application using
electron-builder’s extraResources configuration.main.js:240-279):
Build Output
dist/ Directory
Created by:electron-builder during build process
Contents:
Settings Storage
Development Mode
Location:./settings.json (project root)
Characteristics:
- Writable during development
- Can be edited manually
- Ignored by git
Production Mode
Location: Platform-specific userData directory| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/SlipStream GUI/settings.json |
| Windows | %APPDATA%\SlipStream GUI\settings.json |
| Linux | ~/.config/SlipStream GUI/settings.json |
Development vs Production
File Path Differences
- Development
- Production
Running:
npm startPaths:- Binaries:
./binaries/slipstream-client-* - Settings:
./settings.json - Assets:
./assets/icon.png - Source:
./main.js,./index.html
- Direct file access
- Fast iteration
- Local settings file
- No packaging
Path Resolution Code
Frommain.js:240-245:
Documentation Files
README.md
Sections:- Project overview
- Features list
- Quick start guide
- Architecture diagram (lines 360-380)
- Installation instructions
- Usage guide
- Troubleshooting
BUILD.md
Contents:- Detailed build instructions for each platform
- Prerequisites and dependencies
- Code signing and notarization (macOS)
- Build troubleshooting
- Release process
CONTRIBUTING.md
Guidelines for:- Code style
- Pull request process
- Issue reporting
- Development workflow
- Testing requirements
PROJECT_STRUCTURE.md
Purpose: High-level overview of project organization Contents:- Directory tree
- File descriptions
- Development vs production notes
- Binary requirements
Next Steps
Architecture Overview
Learn about the system architecture
Proxy Chain
Understand the proxy implementation