{"id":13629531,"url":"https://github.com/anacrolix/confluence","last_synced_at":"2025-06-14T14:08:45.636Z","repository":{"id":45052146,"uuid":"76532290","full_name":"anacrolix/confluence","owner":"anacrolix","description":"Torrent client as a HTTP service","archived":false,"fork":false,"pushed_at":"2025-02-10T02:42:50.000Z","size":443,"stargazers_count":245,"open_issues_count":6,"forks_count":33,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-17T23:05:50.244Z","etag":null,"topics":["bittorrent","go","http","microservice","proxy","service","streaming","torrent","torrent-client"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anacrolix.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},"funding":{"github":"anacrolix","patreon":"anacrolix","issuehunt":"anacrolix"}},"created_at":"2016-12-15T06:53:35.000Z","updated_at":"2025-04-12T22:03:08.000Z","dependencies_parsed_at":"2023-11-30T06:24:07.187Z","dependency_job_id":"9d776b75-32dd-4c24-b072-8533116974cc","html_url":"https://github.com/anacrolix/confluence","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/anacrolix/confluence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Fconfluence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Fconfluence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Fconfluence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Fconfluence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anacrolix","download_url":"https://codeload.github.com/anacrolix/confluence/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Fconfluence/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259827668,"owners_count":22917714,"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":["bittorrent","go","http","microservice","proxy","service","streaming","torrent","torrent-client"],"created_at":"2024-08-01T22:01:12.981Z","updated_at":"2025-06-14T14:08:45.587Z","avatar_url":"https://github.com/anacrolix.png","language":"Go","readme":"confluence\n==========\n\nConfluence is a torrent client as a HTTP service. This allows for easy use from other processes, languages, and machines, due to the ubiquity of HTTP. It makes use of [anacrolix/torrent](https://github.com/anacrolix/torrent)'s [download-on-demand](https://godoc.org/github.com/anacrolix/torrent#Torrent.NewReader) torrenting, and [custom data backend](https://godoc.org/github.com/anacrolix/torrent/storage#ClientImpl) features to store data in a cache. You can then utilize the BitTorrent network with sensible defaults as though it were just regular HTTP.\n\nInstallation\n============\n\n## Binary\n```\ngo install github.com/anacrolix/confluence@latest\n```\n\n## Module\n```\ngo get github.com/anacrolix/confluence\n```\n\n## Android\n\nSee https://github.com/arranlomas/Android-Confluence-Wrapper and https://github.com/arranlomas/confluence.\n\nUsage\n=====\n\n```\n$ godo github.com/anacrolix/confluence -h\nUsage:\n  confluence [OPTIONS...]\nOptions:\n  -addr                    (string)          HTTP listen address (Default: localhost:8080)\n  -cacheCapacity           (tagflag.Bytes)   Data cache capacity (Default: 11 GB)\n  -collectCamouflageData   (bool)\n  -debugOnMain             (bool)            Expose default serve mux /debug/ endpoints over http\n  -dht                     (bool)            Default: true\n  -disableTrackers         (bool)            Disables all trackers\n  -fileDir                 (string)          File-based storage directory, overrides piece storage\n  -implicitTracker         ([]string)        Trackers to be used for all torrents\n  -overrideTrackers        (bool)            Only use implied trackers\n  -pex                     (bool)            Default: true\n  -publicIp4               (net.IP)          Public IPv4 address\n  -publicIp6               (net.IP)          Public IPv6 address\n  -seed                    (bool)            Seed data\n  -sqliteStorage           (*string)\n  -tcpPeers                (bool)            Allow TCP peers (Default: true)\n  -torrentGrace            (time.Duration)   How long to wait to drop a torrent after its last request (Default: 1m0s)\n  -uPnPPortForwarding      (bool)            Port forward via UPnP\n  -unlimitedCache          (bool)            Don't limit cache capacity\n  -utpPeers                (bool)            Allow uTP peers (Default: true)\n```\n\nConfluence will announce itself to DHT, and wait for HTTP activity. Torrents are added to the client as needed. Without an active request on a torrent, it is kicked from the client after the torrent grace period. Its data however may remain in the cache for future uses of that torrent.\n\nRoutes\n======\n\nThere are several routes to interact with torrents:\n\n- `GET /data?ih=\u003cinfohash in hex\u003e\u0026path=\u003cdisplay path of file declared in torrent info\u003e\u0026filename=\u003cfile name of the data, optional\u003e`,\n  \n  or `GET /data/infohash/\u003cinfohash in hex\u003e/\u003cdisplay path of file declared in torrent info\u003e`: \n  \n  Responds with file or whole-torrent data, depending on presence of file name argument. \n  Note that this handler supports HTTP range requests for bytes. Response blocks until the data is available.\n- `GET /status`. This fetches the textual status info page per anacrolix/torrent.Client.WriteStatus. Very useful for debugging.\n- `GET /info?ih=\u003cinfohash in hex\u003e`. This returns the info bytes for the matching torrent. It's useful if the caller needs to know about the torrent, such as what files it contains. It will block until the info is available. The response is the full bencoded info dictionary per [BEP 3](http://www.bittorrent.org/beps/bep_0003.html).\n- `/events?ih=\u003cinfohash in hex\u003e`. This is a websocket that emits frames with [confluence.Event] encoded as JSON for the torrent. The PieceChanged field for instance is set if the given piece changed [state](https://godoc.org/github.com/anacrolix/torrent#PieceState) within the torrent.\n- `GET /fileState?ih=\u003cinfohash in hex\u003e\u0026path=\u003cdisplay path of file declared in torrent info\u003e`. Returns [file state](https://godoc.org/github.com/anacrolix/torrent#File.State) encoded as JSON.\n- `POST /metainfo?ih=\u003cinfohash in hex\u003e`. The request body is a bencoded metainfo, as typically appears in a `.torrent` file. The trackers and info bytes are applied to the torrent matching the info hash provided in the query. No fields in the metainfo are mandatory.\n- `GET /metainfo?ih=\u003cinfohash in hex\u003e`. returns a .torrent file containing the hash info.\n\nWherever a `?ih=\u003cinfohash\u003e` query parameter is expected, it can also be substituted by a `?magnet=\u003cmagnet URI\u003e` parameter instead.\n\n## Example\nRunning the following command from a shell will launch VLC and start playing the Sintel movie stream from its public torrent.\n```\nvlc 'http://localhost:8080/data?magnet=magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10\u0026path=Sintel.mp4'\n```\n","funding_links":["https://github.com/sponsors/anacrolix","https://patreon.com/anacrolix","https://issuehunt.io/r/anacrolix"],"categories":["Go","service"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanacrolix%2Fconfluence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanacrolix%2Fconfluence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanacrolix%2Fconfluence/lists"}