How lnblxj/sharethisfolder works
ShareThisFolder is a Windows folder-sharing host: the user launches it from a folder, the app serves that folder over HTTP, and the user shares a LAN or (if available) public URL. The main menu also supports copying URLs, QR codes, settings, and Explorer quick launch. Public access tries UPnP before the STUN tunnel fallback. The graph follows the sampled main, HTTP, and STUN code plus README capabilities; some subsystem links are documented rather than verified in implementation excerpts.
Main entry points: main.cpp Startup and menu · server.cpp HTTP file server · stun_client.cpp STUN tunnel · upnp_client.cpp UPnP mapping
Components 16
Host app
- Startup and menu
src/app/main.cpp - Console UI
src/app/console.cpp - Settings menu
src/app/settings_menu.cpp - Localization
src/util/i18n.cpp
Folder sharing
- Shared folder
- HTTP file server
src/http/server.cpp
Network access
- IP and port discovery
src/net/network.cpp - UPnP mapping
src/net/upnp_client.cpp - STUN tunnel
src/net/stun_client.cpp
Windows integration
- Quick launch
src/app/quick_launch.cpp
Other components
- Folder owner
- Windows system
- Phone or browser
- UPnP router
- STUN service
- QR code service
Connections 19
- Folder owner → Startup and menu: launches
README.md - Startup and menu → IP and port discovery: discovers addresses
src/app/main.cpp - Startup and menu → HTTP file server: starts server
src/app/main.cpp - Startup and menu → Shared folder: shares current folder
src/app/main.cpp - Phone or browser → HTTP file server: requests files
README.md - HTTP file server → Shared folder: reads files
src/http/server.cpp - Startup and menu → Console UI: clears display
src/app/main.cpp - Startup and menu → Localization: gets UI text
src/app/main.cpp - HTTP file server → Localization: gets error text
src/http/server.cpp - Startup and menu → Settings menu: opens settings
src/app/main.cpp - Settings menu → Quick launch: installs or removes
src/app/settings_menu.cpp - Startup and menu → Quick launch: handles admin command
src/app/main.cpp - Quick launch → Windows system: configures Explorer
README.md - Startup and menu → QR code service: downloads QR image
src/app/main.cpp - Startup and menu → UPnP mapping: tries port mapping
src/app/main.cpp - UPnP mapping → UPnP router: maps port
- Startup and menu → STUN tunnel: starts fallback tunnel
src/app/main.cpp - STUN tunnel → STUN service: discovers endpoint
src/net/stun_client.cpp - STUN tunnel → UPnP mapping: maps tunnel port
src/net/stun_client.cpp