Skip to main content

Overview

SlipStream GUI uses Electron’s IPC (Inter-Process Communication) system to communicate between the renderer process (UI) and main process (Node.js backend). All handlers are registered using ipcMain.handle() and invoked from the renderer using ipcRenderer.invoke().

Service Control

start-service

Starts the VPN service with specified settings.
settings
object
Configuration object for starting the VPN.
settings.resolver
string
DNS resolver address (e.g., 8.8.8.8:53)
settings.domain
string
Tunnel domain (e.g., s.example.com)
settings.tunMode
boolean
Enable TUN mode (default: false)
success
boolean
Whether the service started successfully
message
string
Status message describing the result
details
object
Detailed status information about running services
Usage Example:
index.html
const result = await ipcRenderer.invoke('start-service', {
  resolver: '8.8.8.8:53',
  domain: 's.example.com',
  tunMode: false
});

if (result.success) {
  console.log('VPN started:', result.message);
}

stop-service

Stops the VPN service and disables system proxy if it was enabled by the app.
success
boolean
Whether the service stopped successfully
message
string
Status message
details
object
Updated status details after stopping
Usage Example:
index.html
const result = await ipcRenderer.invoke('stop-service');
console.log(result.message);

get-status

Returns the current VPN connection status.
isRunning
boolean
Whether the VPN is currently active
details
object
Detailed status information including client, proxy, and system proxy states
Usage Example:
index.html
const status = await ipcRenderer.invoke('get-status');
if (status.isRunning) {
  console.log('VPN is active');
}

Settings Management

get-settings

Retrieves current application settings.
resolver
string
Current DNS resolver
domain
string
Current tunnel domain
mode
string
Connection mode (proxy or tun)
verbose
boolean
Verbose logging enabled
socks5AuthEnabled
boolean
SOCKS5 authentication enabled
socks5AuthUsername
string
SOCKS5 username
socks5AuthPassword
string
SOCKS5 password
workspaces
array
List of workspace configurations
activeWorkspaceId
string | null
Currently active workspace ID
Usage Example:
index.html
const settings = await ipcRenderer.invoke('get-settings');
console.log('Current resolver:', settings.resolver);
console.log('Verbose mode:', settings.verbose);

set-resolver

Updates the DNS resolver setting.
payload
object
payload.resolver
string
required
DNS resolver in IP:port format (e.g., 1.1.1.1:53)
success
boolean
Whether the resolver was updated successfully
resolver
string
The normalized resolver value (port forced to 53)
error
string
Error message if validation failed
Usage Example:
index.html
const result = await ipcRenderer.invoke('set-resolver', {
  resolver: '1.1.1.1:53'
});

if (result.success) {
  console.log('Resolver updated to:', result.resolver);
}

set-verbose

Toggles verbose logging mode.
verbose
boolean
required
Enable or disable verbose logging
success
boolean
Always true
verbose
boolean
Current verbose mode state
Usage Example:
index.html
const result = await ipcRenderer.invoke('set-verbose', true);
console.log('Verbose logging:', result.verbose);

set-socks5-auth

Configures SOCKS5 authentication settings.
auth
object
auth.enabled
boolean
Enable SOCKS5 authentication
auth.username
string
SOCKS5 username
auth.password
string
SOCKS5 password
success
boolean
Always true
socks5AuthEnabled
boolean
Updated authentication state
socks5AuthUsername
string
Updated username
socks5AuthPassword
string
Updated password
Usage Example:
index.html
const result = await ipcRenderer.invoke('set-socks5-auth', {
  enabled: true,
  username: 'myuser',
  password: 'mypass'
});

Proxy Management

toggle-system-proxy

Enables or disables the system proxy configuration.
enable
boolean
required
true to enable system proxy, false to disable
success
boolean
Whether the operation succeeded
configured
boolean
Current system proxy state
Usage Example:
index.html
const result = await ipcRenderer.invoke('toggle-system-proxy', true);
if (result.success) {
  console.log('System proxy enabled');
}

check-system-proxy

Checks the current system proxy configuration status.
configured
boolean
Whether system proxy is currently configured
Usage Example:
index.html
const proxyStatus = await ipcRenderer.invoke('check-system-proxy');
if (proxyStatus.configured) {
  console.log('System proxy is active');
}

set-proxy-bypass-list

Configures domains/IPs that should bypass the proxy.
list
array
required
Array of domain patterns or IP addresses (e.g., ["localhost", "*.local", "192.168.*"])
success
boolean
Whether the list was updated
proxyBypassList
array
Sanitized bypass list (deduplicated and trimmed)
Usage Example:
index.html
const result = await ipcRenderer.invoke('set-proxy-bypass-list', [
  'localhost',
  '127.0.0.1',
  '*.local'
]);

get-proxy-bypass-list

Retrieves the current proxy bypass list.
success
boolean
Always true
proxyBypassList
array
Current bypass list
Usage Example:
index.html
const result = await ipcRenderer.invoke('get-proxy-bypass-list');
console.log('Bypass list:', result.proxyBypassList);

Testing

test-proxy

Tests the proxy connection by making a request to httpbin.org.
success
boolean
Whether the test succeeded
ip
string
External IP address returned by httpbin (if successful)
responseTime
number
Response time in milliseconds
error
string
Error message if test failed
Usage Example:
index.html
const result = await ipcRenderer.invoke('test-proxy');
if (result.success) {
  console.log(`Connection OK! IP: ${result.ip}, Time: ${result.responseTime}ms`);
} else {
  console.error('Test failed:', result.error);
}

dns-check-single

Tests a single DNS server for reachability and DNS resolution.
payload
object
payload.server
string
required
DNS server IP or IP:port (e.g., 8.8.8.8 or 8.8.8.8:53)
payload.domain
string
required
Test domain to resolve (e.g., google.com)
payload.pingTimeoutMs
number
Ping timeout in milliseconds (default: 2000)
payload.dnsTimeoutMs
number
DNS resolution timeout in milliseconds (default: 2500)
ok
boolean
Whether the check completed (not necessarily successful)
server
string
Server address used for Node.js DNS resolution
ip
string
Server IP address
port
number
Server port
status
string
Status: OK, Ping Only, or Unreachable
ping
object
Ping test results with ok and time fields
dns
object
DNS resolution results with ok, time, and optional error fields
Usage Example:
index.html
const result = await ipcRenderer.invoke('dns-check-single', {
  server: '8.8.8.8',
  domain: 'google.com',
  pingTimeoutMs: 2000,
  dnsTimeoutMs: 2500
});

if (result.ok && result.status === 'OK') {
  console.log(`DNS server ${result.ip} is working!`);
}

Workspaces

get-workspaces

Retrieves all workspace configurations.
success
boolean
Always true
workspaces
array
Array of workspace objects
activeWorkspaceId
string | null
Currently active workspace ID
Usage Example:
index.html
const result = await ipcRenderer.invoke('get-workspaces');
console.log('Workspaces:', result.workspaces);

save-workspaces

Saves workspace configurations and sets the active workspace.
payload
object
payload.workspaces
array
required
Array of workspace objects with id, name, resolver, domain, and proxyBypassList fields
payload.activeWorkspaceId
string
ID of the workspace to set as active
success
boolean
Whether the save succeeded
workspaces
array
Sanitized workspace array
activeWorkspaceId
string | null
Active workspace ID after save
error
string
Error message if save failed
Usage Example:
index.html
await ipcRenderer.invoke('save-workspaces', {
  workspaces: [
    {
      id: 'home-123',
      name: 'Home',
      resolver: '8.8.8.8:53',
      domain: 's.home.com',
      proxyBypassList: []
    }
  ],
  activeWorkspaceId: 'home-123'
});

Utility

get-version

Returns the application version from package.json.
Version string (e.g., 1.0.5)
Usage Example:
index.html
const version = await ipcRenderer.invoke('get-version');
console.log('App version:', version);

check-update

Checks GitHub for available updates.
success
boolean
Whether the check succeeded
hasUpdate
boolean
Whether a newer version is available
currentVersion
string
Current application version
latestVersion
string
Latest version available on GitHub
releaseUrl
string
URL to the GitHub release page
releaseNotes
string
Release notes from GitHub
Usage Example:
index.html
const result = await ipcRenderer.invoke('check-update');
if (result.success && result.hasUpdate) {
  console.log(`Update available: ${result.latestVersion}`);
}

open-external

Opens a URL in the system default browser.
url
string
required
URL to open
success
boolean
Whether the URL was opened successfully
error
string
Error message if opening failed
Usage Example:
index.html
await ipcRenderer.invoke('open-external', 'https://github.com/mirzaaghazadeh/SlipStreamGUI');

Build docs developers (and LLMs) love