{"id":51408815,"url":"https://github.com/the-spark1ch/lanbox","last_synced_at":"2026-07-04T13:01:29.741Z","repository":{"id":339950769,"uuid":"1163961661","full_name":"the-spark1ch/lanbox","owner":"the-spark1ch","description":"LANBox is a lightweight LAN file web server written in Rust. It provides a simple browser interface for uploading, downloading, and managing files between devices on the same local network.","archived":false,"fork":false,"pushed_at":"2026-04-19T18:17:19.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T20:23:48.361Z","etag":null,"topics":["http-server","lan","rust","server"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-spark1ch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-02-22T12:31:08.000Z","updated_at":"2026-04-19T18:17:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/the-spark1ch/lanbox","commit_stats":null,"previous_names":["the-spark1ch/lanbox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/the-spark1ch/lanbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-spark1ch%2Flanbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-spark1ch%2Flanbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-spark1ch%2Flanbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-spark1ch%2Flanbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-spark1ch","download_url":"https://codeload.github.com/the-spark1ch/lanbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-spark1ch%2Flanbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35122497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["http-server","lan","rust","server"],"created_at":"2026-07-04T13:01:29.011Z","updated_at":"2026-07-04T13:01:29.728Z","avatar_url":"https://github.com/the-spark1ch.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LANBox\n\nLANBox is a lightweight LAN file web server written in **Rust**.  \nIt provides a simple browser-based interface for transferring, managing, and sharing files between devices inside a local network.\n\nThe project keeps a minimal design: a small Rust server, a simple API, and a static frontend.\n\n---\n\n## Overview\n\nLANBox lets you start a file server with a single command and access it from any device on the same network.\n\nTypical use cases:\n\n- transferring files between PC and phone\n- sharing files inside a home or office network\n- temporary local file hosting\n- testing HTTP/file workflows\n- a small reference implementation of a file web server\n\nNo accounts or cloud services are required.\n\n---\n\n## Key Features\n\n- Web-based file manager\n- File upload with progress tracking\n- Folder navigation\n- Create directories\n- Rename files and folders\n- Delete files and directories\n- Direct file download\n- Image preview support (frontend dependent)\n- Works across devices in the same LAN\n\n---\n\n## Requirements\n\n- Rust toolchain (stable)\n- Cargo\n- Modern web browser\n\n---\n\n## Project Layout\n\nExpected folders (defaults):\n\n```\nlanbox/\n├─ src/\n│  ├─ main.rs\n│  ├─ config.rs\n│  ├─ handlers.rs\n│  └─ util.rs\n├─ public/        # frontend\n├─ uploads/       # uploaded files\n├─ Cargo.toml\n└─ README.md\n```\n\n- `public/` — static frontend files (index.html, style.css, app.js)\n- `uploads/` — uploaded/shared files\n\n---\n\n## Installation\n\nClone the repository:\n\n```bash\ngit clone https://github.com/thespark1ch/lanbox.git\ncd lanbox\n```\n\nBuild:\n\n```bash\ncargo build --release\n```\n\n---\n\n## Running the Server\n\n### Quick start\n\n```\ntarget/release/lanbox\n```\n\nDefaults:\n\n- `ROOT=./public`\n- `UPLOAD_DIR=./uploads`\n- `HOST=0.0.0.0`\n- `PORT=8080`\n\n### Run on LAN (accessible from other devices)\n\n```\nHOST=0.0.0.0 PORT=8080 ROOT=./public UPLOAD_DIR=./uploads target/release/lanbox\n```\n\nAfter launch the server prints:\n\n```\nLAN:  http://\u003cyour_lan_ip\u003e:8080/\nBind: http://0.0.0.0:8080/\n```\n\nOpen in browser:\n\n```\nhttp://localhost:8080\n```\n\nFrom another device in the same network:\n\n```\nhttp://YOUR_LAN_IP:8080\n```\n\n---\n\n## Configuration\n\nEnvironment variables:\n\n- `ROOT` — frontend directory (default `./public`)\n- `UPLOAD_DIR` — uploads directory (default `./uploads`)\n- `HOST` — bind address (default `0.0.0.0`)\n- `PORT` — port number (default `8080`)\n\nExample:\n\n```\nROOT=./public UPLOAD_DIR=./uploads HOST=0.0.0.0 PORT=8080 target/release/lanbox\n```\n\n---\n\n## API\n\nList directory contents\n\n```\nGET /api/list?dir=PATH\n```\n\nUpload file\n\n```\nPOST /api/upload?dir=PATH\u0026name=FILENAME\nContent-Type: application/octet-stream\n```\n\nCreate folder\n\n```\nPOST /api/mkdir\nBody: {\"dir\":\"/\",\"name\":\"New Folder\"}\n```\n\nRename\n\n```\nPOST /api/rename\nBody: {\"path\":\"/old.txt\",\"name\":\"new.txt\"}\n```\n\nDelete\n\n```\nDELETE /api/delete?path=TARGET\n```\n\nThese endpoints are used by the frontend but can also be used directly.\n\n---\n\n## Security Notes\n\nLANBox is designed for **trusted local networks**.\n\nBasic protections implemented:\n\n- path normalization\n- prevention of directory traversal\n- filename sanitization\n- safe file downloads\n\nRunning LANBox directly on the public internet is **not recommended** without authentication or a reverse proxy.\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-spark1ch%2Flanbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-spark1ch%2Flanbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-spark1ch%2Flanbox/lists"}