Code Monkey home page Code Monkey logo

libtorrent4j's Introduction

libtorrent4j

macOS Linux Windows Android Codacy Badge Codacy Badge Maven Central

A swig Java interface for libtorrent.

Features
Support for WebTorrent https://webtorrent.io
Sequential downloading
Torrents queueing and prioritizing
Torrent content selection and prioritizing
NAT-PMP and UPnP support
Fast resume support
HTTP proxies and basic authentication
IP filter
Torrents over SSL
lt_donthave extension BEP 54
Magnet URI extension - specify indices to download BEP 53
BitTorrent Protocol v2 BEP 52
DHT Infohash Indexing BEP 51
Tracker Protocol Extension: Scrape BEP 48
Padding files and attributes BEP 47
Multiple-address operation for the DHT BEP 45
Storing arbitrary data in the DHT BEP 44
Read-only DHT Nodes BEP 43
IPv6 extension for DHT BEP 32
uTorrent transport protocol (uTP) BEP 29
Private Torrents BEP 27
Tracker Returns External IP BEP 24
Tracker Returns Compact Peer Lists BEP 23
Extension for Partial Seeds BEP 21
HTTP/FTP Seeding (GetRight-style) BEP 19
Superseeding BEP 16
UDP Tracker Protocol BEP 15
Local Service Discovery (LSD) BEP 14
Multitracker Metadata Extension BEP 12
Peer Exchange (PEX) BEP 11
Extension Protocol BEP 10
Magnet links BEP 9
IPv6 Tracker Extension BEP 7
Distributed hash table (DHT) BEP 5

Using

Download the latest JAR or get the dependency via Maven:

<dependency>
  <groupId>org.libtorrent4j</groupId>
  <artifactId>libtorrent4j</artifactId>
  <version>2.x.x</version>
</dependency>

or Gradle:

compile 'org.libtorrent4j:libtorrent4j:2.x.x'

If you use ProGuard to obfuscate/minify make sure to add the following statement

-keep class org.libtorrent4j.swig.libtorrent_jni {*;}

Note that there are multiple versions of libtorrent4j for different platforms:

libtorrent4j
libtorrent4j-android-<arch>
libtorrent4j-macos
libtorrent4j-linux
libtorrent4j-windows

These are all different artifacts, you need to select according to your architecture.

For examples look at demos and tests.

Architectures supported:

  • Android (armeabi-v7a, arm64-v8a, x86, x86_64)
  • macOS (x86_64)
  • Linux (x86_64)
  • Windows (x86_64)

About stability

This library tracks libtorrent master branch. The branch is very stable, runs a lot of tests, and receives bug fixes quickly.

Android local builds

It's possible to build android binaries locally. The solution is docker based, you need to have Docker installed and running (see https://docs.docker.com/engine/install/).

Go to the folder swig/android-build and perform all the operations inside it.

1 - Build the docker image just one time (takes a long time):

docker build -t lt4j:latest .

2 - Select your architecture and run the build script, for example:

./build-arm.sh

3 - Collect the jars in build/libs at the root of the project. Repeat the step 2) for the desired architectures.

License

Licensed under the terms of the MIT license, available here.

libtorrent4j's People

Contributors

aldenml avatar gubatron avatar xkevin190 avatar proninyaroslav 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.