Git Product home page Git Product logo

confluence's Introduction

confluence

Confluence 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's download-on-demand torrenting, and custom data backend features to store data in a cache. You can then utilize the BitTorrent network with sensible defaults as though it were just regular HTTP.

Installation

go get github.com/anacrolix/confluence

Usage

$ godo github.com/anacrolix/confluence -h
Usage:
  confluence [OPTIONS...]
Options:
  -addr            (string)          HTTP listen address (Default: localhost:8080)
  -cacheCapacity   (tagflag.Bytes)   Data cache capacity (Default: 11 GB)
  -dhtPublicIP     (net.IP)          DHT secure IP

Confluence 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 one minute. Its data however may remain in the cache for future uses of that torrent.

Routes

There are several routes to interact with torrents:

  • GET /data?ih=<infohash in hex>&path=<display path of file declared in torrent info>. Note that this handler supports HTTP range requests for bytes. Response will block until the data is available.
  • GET /status. This fetches the textual status info page per anacrolix/torrent.Client.WriteStatus. Very useful for debugging.
  • GET /info?ih=<infohash in hex>. 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.
  • /events?ih=<infohash in hex>. 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 within the torrent.
  • GET /fileState?ih=<infohash in hex>&path=<display path of file declared in torrent info>. Returns file state encoded as JSON.
  • POST /metainfo?ih=<infohash in hex>. Updates a torrents metainfo. New trackers are added. Info bytes are set if not already known. The request body must be the bencoded metainfo, the same as what would appear in a .torrent file.

confluence's People

Contributors

anacrolix avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.