{"id":15521059,"url":"https://github.com/sloev/gundb_torrent_signalling","last_synced_at":"2025-04-23T04:43:02.876Z","repository":{"id":220927078,"uuid":"752694329","full_name":"sloev/gundb_torrent_signalling","owner":"sloev","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-05T16:00:12.000Z","size":994,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T22:11:41.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/sloev.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}},"created_at":"2024-02-04T14:54:26.000Z","updated_at":"2024-04-04T14:51:52.000Z","dependencies_parsed_at":"2024-02-05T08:29:24.151Z","dependency_job_id":"a27b80bd-ffb1-44ed-b22e-7dec6042ae59","html_url":"https://github.com/sloev/gundb_torrent_signalling","commit_stats":null,"previous_names":["sloev/gundb_torrent_signalling"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fgundb_torrent_signalling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fgundb_torrent_signalling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fgundb_torrent_signalling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sloev%2Fgundb_torrent_signalling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sloev","download_url":"https://codeload.github.com/sloev/gundb_torrent_signalling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372902,"owners_count":21419721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-02T10:31:59.351Z","updated_at":"2025-04-23T04:43:02.856Z","avatar_url":"https://github.com/sloev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gundb torrent signalling example\n\nan example on how to solve the problem of webrtc signalling for gundb by the use of a websocket proxy, heavily inspired by Dletta 2021 and https://github.com/Dletta/dht-proxy/blob/main/websocketproxy.js\n\n## what it uses:\n* [gundb](https://github.com/amark/gun)\n* [trystero](https://github.com/dmotz/trystero) (webrtc signalling using webtorrent signalling)\n* vanjs (for frontent ui)\n\n## how it works:\n0. setup a private webtorrent tracker on a public url\n\n1. an infohash is generated for app_id: 'gundb_torrent_signalling_test' and room_id: 'test'\n    ```\n    \u003e npm run create_info_hash gundb_torrent_signalling_test test\n    3665367962366f34703164316e32353666357733\n    ```\n2. a config.json is created:\n    ```json\n    {\n        \"infoHashHex\": \"3665367962366f34703164316e32353666357733\",\n        \"appId\": \"gundb_torrent_signalling_test\",\n        \"roomName\": \"test\",\n        \"trackerUrls\":[\"wss://tracker.com\"]\n    }\n    ```\n3. a set of public and private credentials for the app is created, resulting in creds.client.json and creds.server.json\n```\n\u003e npm run create_root_key\n```\n4. db is initialized with config.json and creds (this initializes the proxy and thereby the trystero webtorrent signalling)\n    ```js\n    const db = setupDb(config, creds)\n    ```\n5. edit [bin/tracker.js](bin/tracker.js) so that it has your infohash in the whitelist\n6. run your private tracker on a public ip: `npm run tracker`\n\nfrom here on the db is ready and will maintain its webrtc connections without bothering gundb\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloev%2Fgundb_torrent_signalling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsloev%2Fgundb_torrent_signalling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsloev%2Fgundb_torrent_signalling/lists"}