Skip to content

Conversation

@scrense-hash
Copy link

Summary

This PR adds full SOCKS5 proxy support to Session Desktop, enabling all application traffic (including onion requests) to be routed through a SOCKS5 proxy server.

Features

  • SOCKS5 proxy with authentication - Username/password support
  • TLS/SSL preservation - Certificate validation and pinning work through proxy
  • Timeout handling - Adjusted timeouts (30s for proxy vs 5s/10s direct)
  • Agent caching - Performance optimization
  • Settings UI - User-friendly proxy configuration page
  • Security - Auto-updater disabled when proxy enabled (prevents traffic leaks)

Changes

18 files changed, 734 insertions(+), 20 deletions(-)

Core Implementation

  • InsecureNodeFetch.ts (+195 lines) - SocksProxyAgentWithTls class and integration
  • ProxySettingsPage.tsx (+199 lines) - UI for proxy configuration
  • settings-key.ts (+15 lines) - Proxy settings storage keys

Integration

  • SeedNodeAPI.ts - 30s timeout when proxy enabled
  • onionPath.ts - 30s timeout when proxy enabled
  • updater.ts - Disable auto-update with proxy (prevents leaks)
  • main_node.ts - Electron proxy configuration

Dependencies

  • Added: socks@^2.8.3, socks-proxy-agent@^8.0.4

Localization

  • English and Russian translations for proxy UI

Security

  • TLS settings preserved from original sslAgent
  • Certificate pinning works through proxy
  • Auto-updater disabled when proxy active (prevents bypass)
  • No security regression for production nodes

Testing

✅ Built and tested on:

  • Linux (deb, rpm, AppImage, freebsd)
  • Windows x64
  • macOS (arm64, x64)

Use Cases

  • Bypass network restrictions and DPI
  • Route all Session traffic through Tor/I2P
  • Corporate/institutional network access
  • Enhanced privacy configuration

🤖 Generated with Claude Code

@scrense-hash scrense-hash force-pushed the feature/socks5-proxy-support branch from 471f358 to 1e6ad13 Compare January 2, 2026 18:37
@scrense-hash
Copy link
Author

Working Build Available

Tested build artifacts with full SOCKS5 proxy UI are available here:
https://github.com/scrense-hash/session-desktop/actions/runs/20663400559#artifacts

What's included:

These commits add critical fixes on top of the main SOCKS5 proxy support:

  • Fix proxy agent TLS caching - Proper caching of SOCKS proxy agents with TLS options to avoid connection issues
  • Fix TLS options flag - Correct handling of TLS configuration in proxy agent initialization
  • Guard job runner logging - Prevent crashes when window object is undefined in main process context
  • Guard window access in focusListener - Fix ReferenceError: window is not defined error at startup

Testing status:

✅ Tested on Linux (AppImage, deb)
✅ Proxy settings UI displays correctly in Settings menu
✅ Client successfully connects through SOCKS5 proxy
✅ No crashes in main process
✅ All artifacts include the complete proxy configuration interface

Download the AppImage or deb package from the artifacts link above to test the full functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant