{"id":21040561,"url":"https://github.com/pixelspark/stshare","last_synced_at":"2026-04-25T15:35:47.981Z","repository":{"id":228062877,"uuid":"773040996","full_name":"pixelspark/stshare","owner":"pixelspark","description":"Share files using sharing links from Syncthing encrypted peers","archived":false,"fork":false,"pushed_at":"2024-12-25T12:57:29.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-25T15:35:46.602Z","etag":null,"topics":["syncthing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixelspark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-03-16T15:26:11.000Z","updated_at":"2024-12-25T12:57:33.000Z","dependencies_parsed_at":"2024-03-16T22:02:18.249Z","dependency_job_id":"2275f7d7-8a4e-4d7f-bfd0-33ab3d664350","html_url":"https://github.com/pixelspark/stshare","commit_stats":null,"previous_names":["pixelspark/stshare"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pixelspark/stshare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelspark%2Fstshare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelspark%2Fstshare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelspark%2Fstshare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelspark%2Fstshare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixelspark","download_url":"https://codeload.github.com/pixelspark/stshare/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixelspark%2Fstshare/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32267710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"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":["syncthing"],"created_at":"2024-11-19T13:47:10.324Z","updated_at":"2026-04-25T15:35:47.961Z","avatar_url":"https://github.com/pixelspark.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `stshare` - Syncthing encrypted peer file server\n\nServes files from Syncthing peers that hold encrypted files using [untrusted device encryption](https://docs.syncthing.net/specs/untrusted.html).\nThis is useful when syncing files to an (untrusted) cloud server, but you still want to be able to hand out 'sharing links'\nthat allow incidental access to specific files. A sharing link only contains the per-file encryption key, so only the\nrequested file can be decrypted by anyone who is able to observe the request.\n\n## How it works\n\nAn encrypted peer's directory looks like this (the original file paths are encrypted, and then chopped up to form paths such as those below):\n\n```bash\n./1.syncthing-enc\n./1.syncthing-enc/00\n./1.syncthing-enc/00/SJ5S56RGM8O1PTG8H19D9I9A8RDBC74K8I0S19LQG\n./1.syncthing-enc/S8\n...\n```\n\nYou can start `stshare` as follows:\n\n```bash\nnpm install\nnpm run run -- test ~/Downloads/test/\n```\n\nThe first argument after the double dashes is the 'folder ID', the second is the path to the encrypted folder.\n\nAfter starting the server, files can be retrieved from this folder by suppying the encrypted file name and the folder password:\n\n```bash\ncurl \"http://localhost:8380/1.syncthing-enc/00/SJ5S56RGM8O1PTG8H19D9I9A8RDBC74K8I0S19LQG?password=geheim\\!\" -vvvv\n*   Trying [::1]:8380...\n* Connected to localhost (::1) port 8380\n\u003e GET /1.syncthing-enc/00/SJ5S56RGM8O1PTG8H19D9I9A8RDBC74K8I0S19LQG?password=geheim! HTTP/1.1\n\u003e Host: localhost:8380\n\u003e User-Agent: curl/8.4.0\n\u003e Accept: */*\n\u003e\n\u003c HTTP/1.1 200 OK\n\u003c Content-disposition: inline; filename=\"CVertex.cpp\"\n\u003c Date: Sat, 16 Mar 2024 14:58:13 GMT\n\u003c Connection: keep-alive\n\u003c Keep-Alive: timeout=5\n\u003c Transfer-Encoding: chunked\n\u003c\nCopyright (C) 2003-2004 Tommy van der Vorst\n\nThis library is free software; you can redistribute it and/or\nmodify it under the terms of the GNU Lesser General Public\nLicense as published by the Free Software Foundation; either\nversion 2.1 of the License, or (at your option) any later version.\n```\n\nAs this service is possibly running on an untrusted peer, you may not want to send the folder password like this (this would allow\ndecryption of all files in the folder to anyone who is able to observe the request and folder key in it). Instead, it is\nmore secure to use the per-file key, which is only useful to decrypt files with a specific name:\n\n```bash\ncurl \"http://localhost:8380/1.syncthing-enc/S8/N0JOTUPV9CSR77AI0S14N77GPKE3AKFDO0J1AIVH0?key=0H4ACQPV3DH6M84HKDISS42Q4DTAQT52V32RBHV6EDU1N87BNI7G\"\nCopyright (C) 2003-2004 Tommy van der Vorst\n\nThis library is free software; you can redistribute it and/or\n...\n```\n\nThis is e.g. useful for sharing links to other people. Add the `\u0026download` query parameter to make the server send headers\nthat suggest the browser to save the file as download, with the original file name:\n\n```bash\ncurl \"http://localhost:8380/1.syncthing-enc/S8/N0JOTUPV9CSR77AI0S14N77GPKE3AKFDO0J1AIVH0?key=0H4ACQPV3DH6M84HKDISS42Q4DTAQT52V32RBHV6EDU1N87BNI7G\u0026download\" -v\n*   Trying [::1]:8380...\n* Connected to localhost (::1) port 8380\n\u003e GET /1.syncthing-enc/S8/N0JOTUPV9CSR77AI0S14N77GPKE3AKFDO0J1AIVH0?key=0H4ACQPV3DH6M84HKDISS42Q4DTAQT52V32RBHV6EDU1N87BNI7G\u0026download HTTP/1.1\n\u003e Host: localhost:8380\n\u003e User-Agent: curl/8.4.0\n\u003e Accept: */*\n\u003e\n\u003c HTTP/1.1 200 OK\n\u003c Content-disposition: attachment; filename=\"CVector.cpp\"\n```\n\nThe file key depends on the folder ID, folder key and (plain text) file name. To invalidate a key, change the file name.\nIf you change a file's contents, the modified file will remain accessible using the same URL.\n\nYou can calculate the file key and 'sharing links' from some other host that does not have the files themselves:\n\n```bash\nnpm run key -- test \"geheim\\!\" CColor.cpp\n```\n\n```\nOriginal file name: CColor.cpp\nCrypted file name: 8.syncthing-enc/G6/MRTKHL1L02KH3PJ4CERR3SVET2JV8ARIEL138U4\nFile key: QH5F521UUMIB49H1G4SEPSA2TO748IG2QLK8C0TPL8E0JRUN3LN0\nURL: http://localhost:8380/8.syncthing-enc/G6/MRTKHL1L02KH3PJ4CERR3SVET2JV8ARIEL138U4?key=QH5F521UUMIB49H1G4SEPSA2TO748IG2QLK8C0TPL8E0JRUN3LN0\n```\n\n## Usage\n\n```sh\nnpm install\nnpm run run\n```\n\n```sh\nnpm run --silent decrypt FILEKY PATH_TO_ENCRYPTED_FILE \u003e decryptedfile.ext\n```\n\n## Development\n\nRe-generate protoc:\n\n```sh\nbrew install protobuf\nnpm install\nnpm run protoc\n```\n\n## License\n\nMIT, except for the following files:\n\n- [bep.proto](./bep.proto): Mozilla Public License Version 2.0\n\n```\nCopyright 2024 Tommy van der Vorst\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelspark%2Fstshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixelspark%2Fstshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixelspark%2Fstshare/lists"}