# nestchao/hotspot-bypass-vpn-unlimited-hotspot architecture

> Architecture diagram of the GitHub repository nestchao/hotspot-bypass-vpn-unlimited-hotspot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot
- Repository: https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot

## Overview

Hotspot Bypass VPN shares a phone’s mobile data over Wi-Fi Direct: the host exposes a SOCKS5 proxy, while Android and Windows clients route traffic through it; Windows can also share onward to consoles and TVs. The repository also contains the product website and a separate GUI preview runtime. Android implementation details were not sampled, so those paths and links reflect README-documented behavior; Windows links are limited to relationships visible in the excerpts. The website and preview are included as distinct product-adjacent branches.

Main entry points: [`gui-preview/src/mobile/MobileRuntime.tsx`](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/MobileRuntime.tsx) (Mobile runtime), [`app/src/main/java/com/example/hotspot_bypass_vpn/HostService.kt`](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/HostService.kt) (Host service), [`laptop_proxy/main.py`](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/laptop_proxy/main.py) (Windows client), [`gui-preview/src/mobile/Device.tsx`](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/Device.tsx) (Device model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_android["Android sharing"]
  node_host_ui["Host controls<br/>[MainActivity.kt]"]
  node_wifi_direct["Wi-Fi Direct"]
  node_host_service["Host service<br/>[HostService.kt]"]
  node_socks_proxy["SOCKS5 proxy<br/>[ProxyServer.kt]"]
  node_socks_parser["SOCKS5 parser<br/>[Socks5Parser.kt]"]
  node_android_vpn["Android VPN client<br/>[MyVpnService.kt]"]
end

subgraph group_windows["Windows client"]
  node_windows_app["Windows client<br/>[main.py]"]
  node_tun_manager["TUN manager<br/>[main.py]"]
  node_console_bridge["Console sharing<br/>[console_bridge.py]"]
end

subgraph group_web["Website"]
  node_website_pages["Product pages<br/>[index.astro]"]
  node_website_guides["Guides and FAQ<br/>[Guide.astro]"]
  node_website_downloads["Downloads<br/>[Download.astro]"]
  node_translations["Translations<br/>[en.ts]"]
end

subgraph group_preview["GUI preview"]
  node_preview_app["Preview app<br/>[Prototype.tsx]"]
  node_preview_runtime["Mobile runtime<br/>[MobileRuntime.tsx]"]
  node_preview_device["Device model<br/>[Device.tsx]"]
  node_preview_frame["Phone frame<br/>[PhoneFrame.tsx]"]
  node_preview_keyboard["Keyboard simulation<br/>[Keyboard.tsx]"]
  node_preview_scroll["Mobile scrolling<br/>[MobileScroll.tsx]"]
  node_preview_flow["Flow navigation<br/>[FlowStack.tsx]"]
  node_preview_carousel["Carousel<br/>[Carousel.tsx]"]
  node_preview_sheet["Bottom sheet<br/>[BottomSheet.tsx]"]
  node_preview_cursor["Mobile cursor<br/>[MobileCursor.tsx]"]
  node_preview_components["Mobile controls<br/>[components.tsx]"]
  node_preview_assets["Device assets<br/>[assets.ts]"]
  node_preview_geometry["Device geometry<br/>[geometry.ts]"]
end

node_mobile_data(("Mobile data"))
node_host_user(("Host user"))
node_android_peer(("Android peer"))
node_windows_user(("Windows user"))
node_console_device(("Console or TV"))
node_website_user(("Website visitor"))

node_host_user -->|"starts sharing"| node_host_ui
node_host_ui -.->|"starts service"| node_host_service
node_host_service -->|"opens network"| node_wifi_direct
node_host_service -->|"exposes proxy"| node_socks_proxy
node_mobile_data -->|"supplies traffic"| node_host_service
node_android_peer -->|"joins network"| node_wifi_direct
node_android_peer -->|"starts VPN"| node_android_vpn
node_android_vpn -->|"routes traffic"| node_socks_proxy
node_windows_user -->|"connects"| node_windows_app
node_windows_app -->|"starts tunnel"| node_tun_manager
node_tun_manager -->|"connects to proxy"| node_socks_proxy
node_windows_app -->|"configures sharing"| node_console_bridge
node_console_device -->|"receives shared network"| node_console_bridge
node_website_user -->|"browses"| node_website_pages
node_website_user -->|"reads setup"| node_website_guides
node_website_user -->|"gets releases"| node_website_downloads
node_preview_app -->|"renders within"| node_preview_runtime
node_preview_runtime -->|"uses device context"| node_preview_device
node_preview_runtime -->|"renders frame"| node_preview_frame
node_preview_runtime -->|"provides keyboard"| node_preview_keyboard
node_preview_scroll -->|"reads insets"| node_preview_keyboard
node_preview_frame -->|"uses cursor"| node_preview_cursor
node_preview_device -->|"uses assets"| node_preview_assets
node_preview_device -->|"uses geometry"| node_preview_geometry

click node_host_ui "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/MainActivity.kt"
click node_wifi_direct "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/WiFiDirectBroadcastReceiver.kt"
click node_host_service "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/HostService.kt"
click node_socks_proxy "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/ProxyServer.kt"
click node_socks_parser "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/Socks5Parser.kt"
click node_android_vpn "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/MyVpnService.kt"
click node_windows_app "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/laptop_proxy/main.py"
click node_tun_manager "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/laptop_proxy/main.py"
click node_console_bridge "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/laptop_proxy/console_bridge.py"
click node_website_pages "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/website/src/pages/index.astro"
click node_website_guides "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/website/src/views/Guide.astro"
click node_website_downloads "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/website/src/views/Download.astro"
click node_translations "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/website/src/i18n/en.ts"
click node_preview_app "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/Prototype.tsx"
click node_preview_runtime "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/MobileRuntime.tsx"
click node_preview_device "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/Device.tsx"
click node_preview_frame "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/PhoneFrame.tsx"
click node_preview_keyboard "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/Keyboard.tsx"
click node_preview_scroll "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/MobileScroll.tsx"
click node_preview_flow "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/FlowStack.tsx"
click node_preview_carousel "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/Carousel.tsx"
click node_preview_sheet "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/BottomSheet.tsx"
click node_preview_cursor "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/MobileCursor.tsx"
click node_preview_components "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/components.tsx"
click node_preview_assets "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/assets.ts"
click node_preview_geometry "https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/geometry.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_host_ui,node_wifi_direct,node_host_service,node_socks_proxy,node_socks_parser,node_android_vpn,node_host_user,node_windows_user toneBlue
class node_windows_app,node_tun_manager,node_console_bridge toneAmber
class node_website_pages,node_website_guides,node_website_downloads,node_translations toneMint
class node_preview_app,node_preview_runtime,node_preview_device,node_preview_frame,node_preview_keyboard,node_preview_scroll,node_preview_flow,node_preview_carousel,node_preview_sheet,node_preview_cursor,node_preview_components,node_preview_assets,node_preview_geometry toneRose
class node_mobile_data,node_android_peer,node_console_device,node_website_user toneIndigo
```

## Components

### Android sharing

- [Host controls](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/MainActivity.kt): `app/src/main/java/com/example/hotspot_bypass_vpn/MainActivity.kt`
- [Wi-Fi Direct](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/WiFiDirectBroadcastReceiver.kt): `app/src/main/java/com/example/hotspot_bypass_vpn/WiFiDirectBroadcastReceiver.kt`
- [Host service](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/HostService.kt): `app/src/main/java/com/example/hotspot_bypass_vpn/HostService.kt`
- [SOCKS5 proxy](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/ProxyServer.kt): `app/src/main/java/com/example/hotspot_bypass_vpn/ProxyServer.kt`
- [SOCKS5 parser](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/Socks5Parser.kt): `app/src/main/java/com/example/hotspot_bypass_vpn/Socks5Parser.kt`
- [Android VPN client](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/app/src/main/java/com/example/hotspot_bypass_vpn/MyVpnService.kt): `app/src/main/java/com/example/hotspot_bypass_vpn/MyVpnService.kt`

### Windows client

- [Windows client](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/laptop_proxy/main.py): `laptop_proxy/main.py`
- [TUN manager](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/laptop_proxy/main.py): `laptop_proxy/main.py`
- [Console sharing](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/laptop_proxy/console_bridge.py): `laptop_proxy/console_bridge.py`

### Website

- [Product pages](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/website/src/pages/index.astro): `website/src/pages/index.astro`
- [Guides and FAQ](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/website/src/views/Guide.astro): `website/src/views/Guide.astro`
- [Downloads](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/website/src/views/Download.astro): `website/src/views/Download.astro`
- [Translations](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/website/src/i18n/en.ts): `website/src/i18n/en.ts`

### GUI preview

- [Preview app](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/Prototype.tsx): `gui-preview/src/Prototype.tsx`
- [Mobile runtime](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/MobileRuntime.tsx): `gui-preview/src/mobile/MobileRuntime.tsx`
- [Device model](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/Device.tsx): `gui-preview/src/mobile/Device.tsx`
- [Phone frame](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/PhoneFrame.tsx): `gui-preview/src/mobile/PhoneFrame.tsx`
- [Keyboard simulation](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/Keyboard.tsx): `gui-preview/src/mobile/Keyboard.tsx`
- [Mobile scrolling](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/MobileScroll.tsx): `gui-preview/src/mobile/MobileScroll.tsx`
- [Flow navigation](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/FlowStack.tsx): `gui-preview/src/mobile/FlowStack.tsx`
- [Carousel](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/Carousel.tsx): `gui-preview/src/mobile/Carousel.tsx`
- [Bottom sheet](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/BottomSheet.tsx): `gui-preview/src/mobile/BottomSheet.tsx`
- [Mobile cursor](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/MobileCursor.tsx): `gui-preview/src/mobile/MobileCursor.tsx`
- [Mobile controls](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/components.tsx): `gui-preview/src/mobile/components.tsx`
- [Device assets](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/assets.ts): `gui-preview/src/mobile/assets.ts`
- [Device geometry](https://github.com/nestchao/hotspot-bypass-vpn-unlimited-hotspot/blob/master/gui-preview/src/mobile/geometry.ts): `gui-preview/src/mobile/geometry.ts`

### Other components

- **Mobile data**
- **Host user**
- **Android peer**
- **Windows user**
- **Console or TV**
- **Website visitor**

## Connections

- Host user → Host controls: starts sharing (evidence: `README.md`)
- Host controls → Host service: starts service
- Host service → Wi-Fi Direct: opens network (evidence: `README.md`)
- Host service → SOCKS5 proxy: exposes proxy (evidence: `README.md`)
- Mobile data → Host service: supplies traffic (evidence: `README.md`)
- Android peer → Wi-Fi Direct: joins network (evidence: `README.md`)
- Android peer → Android VPN client: starts VPN (evidence: `README.md`)
- Android VPN client → SOCKS5 proxy: routes traffic (evidence: `README.md`)
- Windows user → Windows client: connects (evidence: `README.md`)
- Windows client → TUN manager: starts tunnel (evidence: `laptop_proxy/main.py`)
- TUN manager → SOCKS5 proxy: connects to proxy (evidence: `laptop_proxy/main.py`)
- Windows client → Console sharing: configures sharing (evidence: `laptop_proxy/main.py`)
- Console or TV → Console sharing: receives shared network (evidence: `README.md`)
- Website visitor → Product pages: browses (evidence: `README.md`)
- Website visitor → Guides and FAQ: reads setup (evidence: `README.md`)
- Website visitor → Downloads: gets releases (evidence: `README.md`)
- Preview app → Mobile runtime: renders within
- Mobile runtime → Device model: uses device context (evidence: `gui-preview/src/mobile/MobileRuntime.tsx`)
- Mobile runtime → Phone frame: renders frame (evidence: `gui-preview/src/mobile/MobileRuntime.tsx`)
- Mobile runtime → Keyboard simulation: provides keyboard (evidence: `gui-preview/src/mobile/MobileRuntime.tsx`)
- Mobile scrolling → Keyboard simulation: reads insets (evidence: `gui-preview/src/mobile/MobileScroll.tsx`)
- Phone frame → Mobile cursor: uses cursor (evidence: `gui-preview/src/mobile/PhoneFrame.tsx`)
- Device model → Device assets: uses assets (evidence: `gui-preview/src/mobile/Device.tsx`)
- Device model → Device geometry: uses geometry (evidence: `gui-preview/src/mobile/Device.tsx`)
