{"id":48367099,"url":"https://github.com/kwran420/dg-lan","last_synced_at":"2026-05-23T06:15:09.412Z","repository":{"id":349305194,"uuid":"1201640442","full_name":"kwran420/DG-LAN","owner":"kwran420","description":"DG-LAN - A decentralized LAN file sharing tool for gamers. Based on D-LAN by Greg Burri.","archived":false,"fork":false,"pushed_at":"2026-04-05T09:42:17.000Z","size":24503,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-05T10:05:14.877Z","etag":null,"topics":["cpp","file-sharing","gaming","lan","qt5"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kwran420.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-05T00:27:36.000Z","updated_at":"2026-04-05T09:42:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kwran420/DG-LAN","commit_stats":null,"previous_names":["kwran420/dg-lan"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kwran420/DG-LAN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwran420%2FDG-LAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwran420%2FDG-LAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwran420%2FDG-LAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwran420%2FDG-LAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kwran420","download_url":"https://codeload.github.com/kwran420/DG-LAN/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwran420%2FDG-LAN/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31439442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T13:13:19.330Z","status":"ssl_error","status_checked_at":"2026-04-05T13:13:17.778Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","file-sharing","gaming","lan","qt5"],"created_at":"2026-04-05T15:01:57.642Z","updated_at":"2026-05-17T02:15:44.352Z","avatar_url":"https://github.com/kwran420.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DG-LAN\n\n**DG-LAN** decentralises a master file list across a network.  \nOne machine curates the files; every other machine helps distribute them — at full switch speed, with zero configuration.\n\nForked from [D-LAN](https://github.com/Ummon/D-LAN) and rebuilt with a modern UI, robust networking, and a master/client architecture.\n\n\u003e **Built for:** LAN parties, lab environments, office deployments — anywhere you need a designated set of files available to everyone on a network.  \n\u003e Optionally works across subnets via [ZeroTier](https://www.zerotier.com/).\n\n---\n\n## How it works\n\n1. **Master curates** — one machine runs in master mode, shares designated folders, and indexes every file in them.\n2. **Clients join** — other machines connect, browse the master file list, and download what they need.\n3. **Clients rehost** — every file a client downloads is automatically shared back to the network, distributing the load across all peers.\n4. **Discovery is automatic** — peers find each other via multicast, broadcast, subnet scan, and gossip. No manual IP entry.\n\nThe result: a single authoritative file list, distributed across every machine that participates. The more people download, the faster it gets for everyone.\n\n---\n\n## Features\n\n| Category | Feature |\n|----------|---------|\n| **Master List** | Master indexes all shared folders; clients see and download from this curated file list |\n| **Auto-Rehosting** | Downloaded files are automatically re-shared — the network becomes a distributed mirror |\n| **Discovery** | Multicast, directed broadcast, subnet scan (`/24`), gossip / peer exchange (PEX) — fully automatic fallback chain |\n| **File Browsing** | Unified file index in one table — browse the entire master list at a glance |\n| **Downloads** | Multi-source transfers pull from all peers that have the file, maximizing speed |\n| **Queue Management** | Download queue with reorder buttons (⏫ ▲ ▼ ⏬) and right-click menu |\n| **Search** | Fast indexed search across the file list |\n| **Master Password** | Password-protect the network so only authorised clients can join |\n| **Auto-Update** | Checks GitHub Releases on launch; downloads and installs updates in-app |\n| **Forced Update** | Protocol version mismatch triggers a mandatory update dialog |\n| **Logging** | Real-time activity log: scanning, hashing, transfers, peer join/leave |\n| **`dglan://` URLs** | Custom URL scheme for one-click downloads from web pages |\n| **ZeroTier** | Bind to a ZeroTier interface for cross-subnet use |\n| **Remote Control** | GUI can connect to a Core running on another machine |\n| **Headless Core** | Core runs as a Windows service — no GUI required on always-on machines |\n\n---\n\n## Documentation\n\n| Document | For | Purpose |\n|----------|-----|---------|\n| [BUILD.md](BUILD.md) | Contributors, release managers | How to build from source (Windows primary, Linux experimental/native validation, macOS experimental) |\n| [TESTING.md](TESTING.md) | Contributors, CI/CD engineers | How to run tests and validation (Python baseline: 59 tests; legacy C++ tests gated) |\n| [ARCHITECTURE.md](ARCHITECTURE.md) | Core team, system designers | Subsystem design, concurrency patterns, high-risk areas, peer lifecycle, modernization roadmap |\n| [OPERATIONS.md](OPERATIONS.md) | Operators, sysadmins, DevOps | Windows Service setup, logging, troubleshooting, performance tuning, security |\n| [PROJECT-CONTEXT.md](PROJECT-CONTEXT.md) | Contributors, AI assistants | Project structure, build system, version scheme, auto-update flow, architecture notes |\n| [CODE-STYLE.md](CODE-STYLE.md) | Contributors | C++17 naming conventions, Qt patterns, error handling, logging standards, header guards |\n| [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md) | New contributors | Fork/branch/commit workflow, PR checklist, bug/feature templates |\n\n**Quick references:**\n- **Validate your build**: `python3 validate.py` (exit code: 0 = all pass, 1 = failure, 2 = blocked/missing toolchain)\n- **HTTP API**: See [dglan-api/](dglan-api/) for Python bridge and REST endpoints\n- **Source tree**: [PROJECT-CONTEXT.md](PROJECT-CONTEXT.md#project-structure) explains Core, GUI, Common, Protos, Setups\n\n---\n\n## Quick Start\n\n### Master (the machine with the files)\n1. **Install** DG-LAN (download from [GitHub Releases](https://github.com/kwran420/DG-LAN/releases)).\n2. **Add shared folders** in Settings → Preferences — these are the files everyone will download.\n3. **Set a master password** (optional) to restrict who can join.\n4. Leave it running — the master indexes your files and serves the list.\n\n### Clients (everyone else)\n1. **Install** DG-LAN and launch it.\n2. **Enable client mode** in Settings → Preferences → Client mode.\n3. **Browse \u0026 download** from the master file list.\n4. Files you download are automatically rehosted to other clients.\n\nFor cross-subnet / ZeroTier setups, see [BUILD.md](BUILD.md#zerotier-setup).\n\n---\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│  GUI  (Qt5 Widgets)                                      │\n│  ┌────────────────────────────────────────────────────┐  │\n│  │ MainWindow                                         │  │\n│  │  ├─ NetworkWidget  (unified file index + peers)    │  │\n│  │  ├─ Log dock       (real-time activity log)        │  │\n│  │  ├─ Settings       (menu bar → dialog)             │  │\n│  │  ├─ UpdateChecker  (GitHub Releases auto-update)   │  │\n│  │  └─ ScrollingNotification  (update banner)         │  │\n│  └──────────────────────┬─────────────────────────────┘  │\n│                          │ TCP localhost:59485            │\n└──────────────────────────┼───────────────────────────────┘\n                           │\n┌──────────────────────────▼───────────────────────────────┐\n│  Core  (headless daemon / Windows service)                │\n│  ┌──────────────┐  ┌──────────────┐  ┌────────────────┐  │\n│  │ PeerManager  │  │ UDPListener  │  │ FileManager    │  │\n│  │  + Gossip    │  │  + Multicast │  │  + Indexer     │  │\n│  │    PEX       │  │  + Broadcast │  │  + Cache       │  │\n│  │              │  │  + Scan      │  │  + Downloader  │  │\n│  └──────────────┘  └──────────────┘  └────────────────┘  │\n└──────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Peer Discovery\n\nPeers are found automatically via a fallback chain:\n\n| Method | When |\n|--------|------|\n| Multicast (`224.0.0.1:59486`) | Always — primary mechanism |\n| Directed broadcast (`x.x.x.255`) | Fallback when no multicast response ~2 s |\n| Subnet scan (`/24`) | Fallback when no broadcast response ~4 s |\n| Gossip / PEX | Continuously after first peer contact; peers share neighbour lists |\n\nGossip entries expire after 30 minutes (configurable). The peer list is capped at 50 gossip candidates.\n\n---\n\n## Ports\n\n| Port | Protocol | Purpose |\n|------|----------|---------|| 59480 | TCP | Built-in HTTP file server ([docs](HTTP-SERVER.md)) || 59485 | TCP | GUI ↔ Core remote control |\n| 59486 | UDP | Multicast / broadcast peer discovery |\n| 59487 | UDP + TCP | Unicast peer communication |\n\nPorts increment if busy (range 59486–59497). See [BUILD.md](BUILD.md#firewall) for firewall rules.\n\n---\n\n## `dglan://` URL Scheme\n\nWeb pages can link directly into DG-LAN:\n\n```\ndglan://download?peer=PEER_HEX\u0026hash=ENTRY_HEX\u0026size=BYTES\u0026name=FILENAME\u0026path=/\n```\n\n| Parameter | Description |\n|-----------|-------------|\n| `peer` | 56-char hex peer ID |\n| `hash` | 56-char hex shared-entry ID |\n| `size` | File size in bytes |\n| `name` | Percent-encoded filename |\n| `path` | Percent-encoded path (`/` for root) |\n\nIf DG-LAN is running, the download starts immediately via IPC. If not, DG-LAN launches and queues the download after connecting to Core.\n\nRegistration instructions: [BUILD.md — URL Scheme Registration](BUILD.md#url-scheme-registration-dglan).\n\n---\n\n## Built-in HTTP File Server\n\nCore includes a compiled-in HTTP server (port 59480) that lets any browser on the LAN\naccess shared files — no DG-LAN client required. Enabled by default, zero configuration.\n\n- Stream video/audio with seeking (Range requests)\n- ETag caching, proper MIME types, CORS\n- Peer redirect — if this machine doesn't have the file, redirects to one that does\n\nFull documentation: **[HTTP-SERVER.md](HTTP-SERVER.md)**\n\n## Python API Bridge\n\nThe `dglan-api/` directory contains a standalone Python HTTP server that connects to Core\nand adds `dglan://` download links, configurable CORS, and forced-download mode.\n\n| Document | Description |\n|----------|-------------|\n| [dglan-api/README.md](dglan-api/README.md) | Quick start and configuration |\n| [dglan-api/HTTP-STREAMING.md](dglan-api/HTTP-STREAMING.md) | Full API reference, HTTP features, JavaScript integration, deployment |\n| [dglan-api/TESTING.md](dglan-api/TESTING.md) | Testing guide (manual + 59 automated tests) |\n\nSee the [comparison table](HTTP-SERVER.md#comparison-built-in-server-vs-python-bridge) to choose between the two.\n\n---\n\n## Documentation\n\n| Document | Audience | Content |\n|----------|----------|---------|\n| **[ARCHITECTURE.md](ARCHITECTURE.md)** | Core contributors, designers | Module structure, concurrency model, subsystem boundaries, risk hotspots, state machines, design rationale |\n| **[OPERATIONS.md](OPERATIONS.md)** | System admins, operators | Windows Service setup, logging, troubleshooting, performance tuning, security, backup/recovery |\n| **[BUILD.md](BUILD.md)** | Contributors, release managers | Build prerequisites, compile steps, Windows/Linux/macOS, URL scheme registration, firewall rules |\n| **[PROJECT-CONTEXT.md](PROJECT-CONTEXT.md)** | AI assistants, contributors | Build system, version scheme, auto-update flow, CI/CD, file structure |\n\n---\n\n## Testing\n\nRun the repo validation entrypoint before submitting changes:\n\n```bash\npython3 validate.py\n```\n\nIt reports each validation layer as pass, fail, or blocked. Full coverage details, manual smoke expectations, and current desktop-validation gaps are documented in [TESTING.md](TESTING.md).\n\n---\n\n## Building from Source\n\nSee **[BUILD.md](BUILD.md)** for full instructions.\n\n**Cross-platform release command:**\n```bash\n./release.sh --skip-publish      # build for your platform, no git push\n./release.sh                     # build + publish to GitHub Releases\n```\n\n**Platform-native builders:**\n```powershell\n# Windows (PowerShell)\n.\\build-release.ps1 -SkipPublish  # build only\n\n# Linux (Bash)\n./build-release.sh -SkipPublish   # build only\n```\n\nThe cross-platform `release.sh` wrapper auto-detects Windows vs. Linux and dispatches to the appropriate native builder.\n\n---\n\n## Contributing\n\n1. Fork and clone the repo.\n2. Build natively for your platform (`.\\build-release.ps1 -SkipPublish` on Windows or `./build-release.sh -SkipPublish` on Linux).\n3. Run `python3 validate.py` and complete the relevant manual checks from [TESTING.md](TESTING.md).\n4. Open a PR describing what changed, why, and how it was tested.\n\n---\n\n## License\n\nGPLv3 — see [COPYING](COPYING) for the full text.  \nOriginal D-LAN by Greg Burri: [github.com/Ummon/D-LAN](https://github.com/Ummon/D-LAN).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwran420%2Fdg-lan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkwran420%2Fdg-lan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwran420%2Fdg-lan/lists"}