How dmitriykuptsov/soho-vpn-over-tls works
SOHO VPN over TLS creates an encrypted tunnel between a client box on the local network and a VPN server. The client authenticates, receives tunnel parameters, changes routing and DNS, then relays traffic between a TUN interface and TLS; the server authenticates, assigns an address, and forwards tunnel traffic. The graph includes the shared protocol and connection state plus network setup capabilities. Relationships follow the excerpts and README; some server-side networking details are documented but their implementation calls were not sampled.
Main entry points: client.py Client session · server.py Server session · database.py File authentication · tun.py Client TUN interface
Components 18
VPN client
- Client session
src/client/client.py - Client settings
src/client/config.py
VPN server
- Server session
src/server/server.py - Server settings
src/server/config.py - Credential records
src/server/database.dat - Client IP pool
src/common/pool.py - File authentication
src/common/database.py
Tunnel networking
- Client TUN interface
src/common/tun.py - Server TUN interface
src/common/tun.py - Route configuration
src/common/routing.py - DNS configuration
src/common/dns.py - Forwarding and NAT
src/common/nat.py
Shared runtime
- VPN packet protocol
src/common/packet.py - Connection state
src/common/state.py
Other components
- SOHO network
- Local status client
- TLS connection
- Internet
Connections 21
- SOHO network → Client session: starts VPN
README.md - Client session → Client settings: reads settings
src/client/client.py - Client session → TLS connection: opens TLS
src/client/client.py - Server session → TLS connection: accepts TLS
src/server/server.py - Client session → VPN packet protocol: encodes and parses
src/client/client.py - Server session → VPN packet protocol: encodes and parses
src/server/server.py - Client session → Connection state: updates state
src/client/client.py - Server session → Connection state: updates state
src/server/server.py - Server session → Server settings: reads settings
src/server/server.py - Server session → File authentication: checks credentials
src/server/server.py - File authentication → Credential records: loads records
- Server session → Client IP pool: leases address
src/server/server.py - Server session → Server TUN interface: creates and relays
src/server/server.py - Client session → Client TUN interface: creates and relays
src/client/client.py - Client session → Route configuration: configures routes
src/client/client.py - Client session → DNS configuration: configures DNS
src/client/client.py - Client session → Forwarding and NAT: restores networking
src/client/client.py - Local status client → Client session: requests status
src/client/client.py - Server session → Forwarding and NAT: uses forwarding
README.md - Client TUN interface → SOHO network: carries network traffic
README.md - Server TUN interface → Internet: forwards traffic
README.md