Commit graph

4 commits

Author SHA1 Message Date
torlando-tech
ac8e484ff1 Add SOCKS5 proxy UI fields to TCP Client interface config
Wire up the existing TorClientInterface backend to the UI by adding
SOCKS5 proxy toggle, host, and port fields under TCP Client advanced
options. Also fix socket resource leak during reconnect cycles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 19:47:17 -05:00
torlando-tech
e64026e01d Address review feedback: deployment robustness, premature online, .onion UX
- Use shutil.copy2 (sibling file via __file__) as primary deployment
  method for TorClientInterface.py, with pkgutil.get_data as fallback
- Remove premature self.online = True before timeout configuration
- Prevent disabling SOCKS proxy toggle when .onion address is entered

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 18:53:40 -05:00
torlando-tech
c500ad9096 Address Greptile review: unknown ATYP handling and hostname validation
- Add else clause for unsupported SOCKS5 ATYP values to prevent socket
  desynchronization from unconsumed bind address bytes
- Move hostname length validation into _socks5_handshake() where
  self.target_ip is used, rather than checking config value pre-init

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 18:53:40 -05:00
torlando-tech
892163a0cf Replace SOCKS5 monkey-patch with TorClientInterface external module
The previous socket.create_connection monkey-patch wasn't actually
intercepting Reticulum's TCP connections (RNS uses socket.connect()
directly, never create_connection). Replace with a proper RNS external
interface module that subclasses TCPClientInterface.

- Add TorClientInterface.py: overrides connect() with SOCKS5 handshake,
  uses Username/Password auth for Tor stream isolation (different
  circuits per interface), Tor-appropriate keepalive timeouts
- Remove ~175 lines of monkey-patch code from reticulum_wrapper.py
- Deploy interface to {configdir}/interfaces/ via pkgutil (RNS loads
  external interfaces from this directory)
- Config generation emits type=TorClientInterface with proxy_host/port
  when socks_proxy_enabled is set

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 18:53:40 -05:00