How leassaryn/myssh works
myssh is a multi-protocol SSH tunnel engine that exposes a local SOCKS5/HTTP proxy, with an optional web dashboard for managing profiles and observing operation. The main workflow is configuration and start, SSH connection over a selected transport, then local proxy traffic forwarded through the tunnel; optional DNS and geolocation routing influence egress. The graph also preserves documented transport families, probes, traffic statistics, and dashboard storage. Several subsystem links rely on README descriptions because their implementation files were not excerpted.
Main entry points: ssh_client.go SSH client · engine.go Engine lifecycle · unified_outbound.go Unified outbound · web.go Web API
Components 25
Engine lifecycle
- CLI entry
cmd/main.go - Configuration
config.go - Engine lifecycle
engine.go - Engine callbacks
engine_callback.go
Proxy data plane
- SOCKS5 ingress
socks5.go - SOCKS server
socks_server.go - Unified outbound
unified_outbound.go - TCP and UDP relay
relay.go - Traffic statistics
traffic_stats.go
Tunnel transports
- SSH client
ssh_client.go - HTTP transports
tunnel_h2.go - Stream transports
tunnel_raw.go - Datagram transports
tunnel_udp_custom.go - KCP transport
tunnel_kcptun.go
DNS and routing
- DNS resolver
dns.go - DNS cache
dns_cache.go - Geo data
geo_download.go - Geo routing
georouter.go - IPv6 egress
ipv6_egress.go
Management and observability
- Latency and speed probes
probe.go - Web dashboard
web/html/static/script.js - Web API
web/web.go - Profile database
web/db.go
Other components
- User or host app
- SSH endpoint
Connections 26
- User or host app → CLI entry: starts
cmd/main.go - CLI entry → Configuration: loads
cmd/main.go - CLI entry → Engine lifecycle: starts
cmd/main.go - Engine lifecycle → SOCKS server: starts
engine.go - Engine lifecycle → SSH client: connects
- Engine lifecycle → DNS resolver: starts
engine.go - Engine lifecycle → Engine callbacks: emits events
engine_callback.go - SOCKS5 ingress → Unified outbound: dispatches
- Unified outbound → SSH client: forwards traffic
- Unified outbound → Geo routing: selects route
- Unified outbound → TCP and UDP relay: relays
- SOCKS5 ingress → Traffic statistics: records usage
- SSH client → SSH endpoint: opens session
- SSH client → HTTP transports: uses transport
- SSH client → Stream transports: uses transport
- SSH client → Datagram transports: uses transport
- SSH client → KCP transport: uses transport
- DNS resolver → DNS cache: uses cache
- Geo data → Geo routing: provides rules
- IPv6 egress → Unified outbound: supports egress
- User or host app → Web dashboard: manages proxy
- Web dashboard → Web API: calls API
web/html/static/script.js - Web API → Profile database: reads profiles
- Web API → Engine lifecycle: starts or stops
- Web API → Traffic statistics: reads statistics
- User or host app → Latency and speed probes: requests probes