System Architecture
The application consists of several key components working together:Core Components
Electron Application
Main process manages system integration, spawns native binaries, and handles IPC
HTTP Proxy Server
Node.js HTTP proxy on port 8080 converts HTTP/HTTPS requests to SOCKS5
SlipStream Client
Native binary that establishes encrypted SOCKS5 connection on port 5201
System Proxy
OS-level proxy configuration routes all traffic through the application
Process Architecture
Main Process (main.js)
The Electron main process handles:- Window creation and lifecycle management
- Native binary process spawning and supervision
- HTTP proxy server implementation
- System proxy configuration
- IPC communication with renderer
- Settings persistence
Renderer Process (index.html)
The renderer process provides:- User interface and controls
- Status monitoring and display
- Real-time log viewing
- Settings management UI
- IPC communication with main process
The renderer runs with
nodeIntegration: true and contextIsolation: false to enable direct Node.js access for IPC communication.Binary Process Management
SlipStream Client Spawning
The native SlipStream client binary is spawned as a child process frommain.js:281-398:
Binary Path Resolution
The application looks for platform-specific binaries inmain.js:240-279:
In development, binaries are loaded from
./binaries/. In packaged apps, they’re loaded from process.resourcesPath.IPC Communication
Main to Renderer
The main process sends updates to the renderer usingsafeSend() from main.js:183-190:
status-update- Connection status changesslipstream-log- Client stdout logsslipstream-error- Client stderr errorsslipstream-exit- Process termination
Renderer to Main
The renderer sends commands viaipcMain handlers registered in main.js:
start-vpn- Start SlipStream client and proxystop-vpn- Stop client and cleanupconfigure-system-proxy- Enable OS proxy settingsdisable-system-proxy- Restore OS proxy settingssave-settings- Persist configurationget-status- Request current status
Port Configuration
The application uses two fixed ports defined inmain.js:16-17:
Data Flow
- Application makes request → Configured to use HTTP proxy at 127.0.0.1:8080
- HTTP Proxy receives request → Converts to SOCKS5 protocol
- SOCKS5 forwarding → Sends to SlipStream client at 127.0.0.1:5201
- Client encrypts → Establishes tunnel to VPN server
- VPN server routes → Forwards to destination on internet
- Response flows back → Through same chain in reverse
Error Handling
The application implements several error recovery mechanisms:Process Supervision
Frommain.js:356-365:
Port Conflict Detection
Frommain.js:333-341:
Uncaught Exception Handling
Frommain.js:21-26:
Settings Persistence
Settings are stored in JSON format in the Electron userData directory (main.js:51-163):
- Development:
./settings.json - Production:
~/.config/SlipStream GUI/settings.json(varies by OS)
- DNS resolver configuration
- Domain settings
- Proxy mode (HTTP vs TUN)
- Authentication credentials
- System proxy state
- Workspace configurations
Next Steps
Proxy Chain
Learn how the multi-layer proxy system works
Project Structure
Explore the codebase organization