{"id":51355285,"url":"https://github.com/denilson-polonio/tcloud-webdav-extension","last_synced_at":"2026-07-02T19:09:26.236Z","repository":{"id":367386479,"uuid":"1280477772","full_name":"denilson-polonio/tcloud-webdav-extension","owner":"denilson-polonio","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-25T18:39:19.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-25T20:14:17.777Z","etag":null,"topics":["extensions","protocol","tcloud","tcloud-extensions","telegram","webdav"],"latest_commit_sha":null,"homepage":"https://tcloud.denilson.it","language":"JavaScript","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/denilson-polonio.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-06-25T16:12:55.000Z","updated_at":"2026-06-25T18:39:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/denilson-polonio/tcloud-webdav-extension","commit_stats":null,"previous_names":["denilson-polonio/tcloud-webdav-extension"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/denilson-polonio/tcloud-webdav-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denilson-polonio%2Ftcloud-webdav-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denilson-polonio%2Ftcloud-webdav-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denilson-polonio%2Ftcloud-webdav-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denilson-polonio%2Ftcloud-webdav-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denilson-polonio","download_url":"https://codeload.github.com/denilson-polonio/tcloud-webdav-extension/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denilson-polonio%2Ftcloud-webdav-extension/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35059416,"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-02T02:00:06.368Z","response_time":173,"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":["extensions","protocol","tcloud","tcloud-extensions","telegram","webdav"],"created_at":"2026-07-02T19:09:24.520Z","updated_at":"2026-07-02T19:09:26.221Z","avatar_url":"https://github.com/denilson-polonio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webdav for TCloud\n\nMount your self-hosted [TCloud](https://github.com/denilson-polonio/tcloud) as a real\nnetwork drive on Windows, macOS, Linux, or your phone. Browse, open, copy, and save\nfiles straight from your file manager — no separate desktop client.\n\nThis repository contains two pieces that work together:\n\n1. **The extension** (`index.js`) — a sidebar page inside TCloud that explains the setup\n   and gives you ready-to-copy commands for your operating system.\n2. **The bridge** (`bridge/tcloud-webdav-bridge.js`) — a tiny, dependency-free Node.js\n   program **you run yourself** (your Raspberry Pi is ideal). It speaks WebDAV to your OS\n   and talks to TCloud's REST API on your behalf.\n\n---\n\n## How it works\n\nA browser extension cannot open a network share: browsers can't listen on a socket and\nthere is no server-side code in an extension. So the drive is served by a small local\nbridge instead. Your file manager talks WebDAV to the bridge; the bridge translates that\ninto ordinary TCloud REST calls.\n\n```\n┌──────────────────┐      WebDAV / HTTP      ┌────────────────────┐      REST / HTTP     ┌──────────────┐\n│  OS file manager │  ────────────────────▶  │  tcloud-webdav-    │  ─────────────────▶  │    TCloud    │\n│  (Explorer /     │                          │  bridge.js          │                      │   server     │\n│   Finder /       │  ◀────────────────────  │  (runs on your Pi)  │  ◀─────────────────  │  (your data) │\n│   davfs / rclone)│       files, folders     └────────────────────┘     JSON, streams    └──────────────┘\n└──────────────────┘\n```\n\nThe bridge holds your TCloud credentials and sees your **decrypted** files, so by default\nit binds to `127.0.0.1` and is protected by HTTP Basic auth. Keep it on a machine and\nnetwork you trust.\n\n---\n\n## Why WebDAV and not SMB (Samba)?\n\nSMB would require the full Samba protocol stack, a privileged port (445), and credential\nhandling that differs on every operating system. WebDAV is just HTTP: it maps cleanly onto\nTCloud's existing file API, needs no privileged port, and Windows, macOS, Linux and mobile\nfile managers can all mount it out of the box.\n\n---\n\n## Repository layout\n\n```\nextension.json                   Extension manifest (id, version, entry)\nindex.js                         The extension itself (sidebar page + mount helper)\ni18n/\n  en.json                        English strings (primary)\n  it.json                        Italian strings (extra)\nbridge/\n  tcloud-webdav-bridge.js        The WebDAV ↔ TCloud bridge (run this yourself)\nLICENSE                          MIT\nREADME.md                        This file\n```\n\n---\n\n## 1 · Install the extension\n\nInstall it in TCloud the same way as any other community extension: point TCloud at this\nrepository (`denilson-polonio/tcloud-webdav-extension`). A **Network Drive** entry then appears\nin the sidebar. Open it for live, copy-ready commands tailored to your host and port.\n\n---\n\n## 2 · Run the bridge\n\nThe bridge needs **Node.js 18 or newer** and **no external packages** (it uses only Node's\nbuilt-in `http`, `https`, `url`, and `crypto` modules).\n\nGet `bridge/tcloud-webdav-bridge.js` onto the machine that should host the drive — the panel's\n**Download the bridge** button opens it on GitHub (use *Download raw file*), or just grab it from\nthis repo — then start it:\n\n```bash\nTCLOUD_URL=\"https://your-tcloud.example\" \\\nTCLOUD_USER=\"your-username\" TCLOUD_PASS=\"your-password\" \\\nBRIDGE_USER=\"tcloud\" BRIDGE_PASS=\"choose-a-strong-password\" \\\nBRIDGE_HOST=\"127.0.0.1\" BRIDGE_PORT=\"4819\" \\\nnode tcloud-webdav-bridge.js\n```\n\nOn start it logs in to TCloud once and then listens for WebDAV connections.\n\n### Environment variables\n\n| Variable          | Required | Default                         | Purpose |\n|-------------------|----------|---------------------------------|---------|\n| `TCLOUD_URL`      | yes      | —                               | Base URL of your TCloud server (no trailing slash). |\n| `TCLOUD_USER`     | yes\\*    | —                               | TCloud username the bridge logs in with. |\n| `TCLOUD_PASS`     | yes\\*    | —                               | TCloud password for that user. |\n| `TCLOUD_TOKEN`    | no       | —                               | A TCloud session token, if you prefer it over username/password. Sent as the `x-auth-token` header. |\n| `BRIDGE_HOST`     | no       | `127.0.0.1`                     | Address the bridge binds to. Use `0.0.0.0` only on a trusted LAN. |\n| `BRIDGE_PORT`     | no       | `4819`                          | Port the bridge listens on. |\n| `BRIDGE_USER`     | no       | `TCLOUD_USER` or `tcloud`       | Username your OS uses to mount the drive. |\n| `BRIDGE_PASS`     | no       | `TCLOUD_PASS`                   | Password your OS uses to mount the drive. |\n\n\\* Provide either `TCLOUD_USER` + `TCLOUD_PASS`, or `TCLOUD_TOKEN`.\n\nThe bridge logs in with `remember: true` so its session is long-lived, and it re-authenticates\nautomatically if the session ever expires. **Two-factor accounts:** the bridge cannot complete a\n2FA challenge on its own. If the account has 2FA enabled, either use a dedicated account without\n2FA for the bridge, or set `TCLOUD_TOKEN` to a session token copied from the TCloud web app (in\nyour browser's storage, the value TCloud sends as `x-auth-token`).\n\n### Keep it running\n\nOn the Pi, run it under whatever you already use — a `systemd` service, `pm2`, or a\n`screen`/`tmux` session — so it survives reboots.\n\n---\n\n## 3 · Mount the drive\n\nReplace `HOST` and `PORT` with your bridge's address (defaults `127.0.0.1` and `4819`).\nLog in with `BRIDGE_USER` / `BRIDGE_PASS`.\n\n**Windows** (Command Prompt):\n\n```bat\nnet use * \"\\\\HOST@PORT\\DavWWWRoot\" /user:tcloud *\n```\n\n**macOS** — Finder → Go → Connect to Server (⌘K):\n\n```\nhttp://HOST:PORT/\n```\n\n**Linux** (davfs2):\n\n```bash\nsudo mount -t davfs http://HOST:PORT/ /mnt/tcloud\n```\n\n**rclone** (any OS):\n\n```bash\nrclone config create tcloud webdav url=http://HOST:PORT/ vendor=other user=tcloud\nrclone mount tcloud: /mnt/tcloud --vfs-cache-mode writes\n```\n\n### Windows: allow Basic auth over HTTP (one-time)\n\nWindows refuses Basic authentication over plain HTTP by default, so the mount fails until\nyou raise `BasicAuthLevel`. As Administrator:\n\n```bat\nreg add HKLM\\SYSTEM\\CurrentControlSet\\Services\\WebClient\\Parameters /v BasicAuthLevel /t REG_DWORD /d 2 /f\nnet stop WebClient \u0026\u0026 net start WebClient\n```\n\nThis is only needed if the bridge is reached over HTTP. If you put the bridge behind HTTPS\n(for example via a reverse proxy), you can skip it.\n\n---\n\n## How the bridge talks to TCloud\n\nThe bridge's TCloud adapter is written and verified against **TCloud 3.2.1**'s REST API. You\ndon't need to configure anything here — it's documented so you can follow what happens and\nadapt it if a future TCloud version changes the API. Authentication uses a session token\n(obtained from `POST /api/auth/login`) sent on every request as the `x-auth-token` header.\n\n| Action          | Method \u0026 path                        | Request                                              | Response |\n|-----------------|--------------------------------------|------------------------------------------------------|----------|\n| Login           | `POST /api/auth/login`               | `{ \"username\", \"password\", \"remember\": true }`       | `{ \"token\", \"user\" }` (or `{ \"twoFactor\": true }`). |\n| List folder     | `GET /api/list?folder=ID`            | omit `folder` for the root                           | `{ \"folders\": [{ \"id\", \"name\", \"created_at\" }], \"files\": [{ \"id\", \"name\", \"size\", \"mime\", \"created_at\" }] }` |\n| Download file   | `GET /api/download/ID`               | honours the `Range` header                           | File bytes (streamed, supports `206`). |\n| Upload file     | `POST /api/upload`                   | `multipart/form-data`: field `files` + field `folder`| `{ \"files\": [...] }` |\n| Create folder   | `POST /api/folders`                  | `{ \"name\", \"parent\" }` (omit `parent` for root)      | `{ \"id\", \"name\", ... }` |\n| Delete file     | `DELETE /api/files/ID`               | —                                                    | `{ \"ok\": true }` |\n| Delete folder   | `DELETE /api/folders/ID`             | —                                                    | `{ \"ok\": true }` |\n| Move / rename file   | `PATCH /api/files/ID`           | `{ \"name\", \"folder\" }` (`folder: null` = root)       | updated file |\n| Move / rename folder | `PATCH /api/folders/ID`         | `{ \"name\", \"parent\" }` (`parent: null` = root)       | updated folder |\n\nThe drive root maps to TCloud's top level (items with no parent folder); the bridge requests it\nby omitting the `folder` parameter. File timestamps come from `created_at`.\n\n### Mapped vs. partial WebDAV verbs\n\n`PROPFIND`, `GET`, `HEAD`, `PUT`, `DELETE`, `MKCOL`, `MOVE`, and `OPTIONS` are fully wired.\n`GET` forwards byte-range requests so media scrubbing and large-file reads work. `PUT` overwrites\nan existing file in place (it uploads the new copy, then removes the old one, so editors that save\nrepeatedly don't pile up duplicates). `COPY` works for single files (server-side folder copy\nreturns `501`). `LOCK`/`UNLOCK` are acknowledged with a stub token so Office and Finder stay happy;\nthe bridge does not enforce real locks.\n\n---\n\n## Security\n\n- The bridge can see your **decrypted** files. Treat it like a key to your storage.\n- It binds to `127.0.0.1` by default. Only switch `BRIDGE_HOST` to `0.0.0.0` on a network\n  you trust, and always set a strong `BRIDGE_PASS`.\n- For access beyond your LAN, put the bridge behind a reverse proxy with HTTPS rather than\n  exposing the port directly.\n- `BRIDGE_USER`/`BRIDGE_PASS` are checked with a constant-time comparison.\n\n---\n\n## Publishing \u0026 auto-updates\n\nThis extension auto-updates through GitHub Releases. To ship a new version:\n\n1. Bump `\"version\"` in `extension.json`.\n2. Commit and push to the branch TCloud tracks.\n3. Create a GitHub Release whose tag matches that version (for example `v1.0.1`).\n\nTCloud loads `index.js` and the `i18n/*.json` files from the repo at the tracked ref, and\nthe extension page pulls `bridge/tcloud-webdav-bridge.js` from the same ref for its download\nbutton — so keep the bridge file in the repo alongside each release.\n\n---\n\n## Internationalization\n\nUI strings live in `i18n/`, keyed by their English text — English (`en.json`) is the primary\nlanguage and Italian (`it.json`) is included as an extra; both files contain the exact same set\nof keys. Because TCloud serves the app with a strict Content-Security-Policy (`connect-src 'self'`),\nan extension can't fetch its translation files from GitHub at runtime, so `index.js` ships with\nboth dictionaries **embedded** (generated from these JSON files). The `i18n/` files remain the\nsource of truth: edit them, then re-embed into `index.js` when you change a translation. To add a\nlanguage, copy `en.json` to `i18n/\u003clang\u003e.json`, translate the values, and embed it the same way.\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenilson-polonio%2Ftcloud-webdav-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenilson-polonio%2Ftcloud-webdav-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenilson-polonio%2Ftcloud-webdav-extension/lists"}