
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
Deluger is a simple Node.js wrapper around the Deluge API, providing a convenient interface to interact with Deluge torrent client (version 2.1 and above).
Important: This package is only compatible with Deluge version 2.1 and above.
You can install Deluger using npm:
npm install deluger
Here's a basic example of how to use Deluger:
import Deluge from 'deluger';
const deluge = new Deluge('http://localhost', 'password', 8112);
// Get current status
const status = await deluge.getStatus(['progress']);
console.log(status);
// List torrents
const torrents = await deluge.listTorrents();
console.log(torrents);
new Deluge(hostname: string, password: string, port: number = 8112)Creates a new Deluge instance.
authenticate()Authenticates with the Deluge server, is also called authomatically when another method is called while not being authenticated.
Promise<boolean>addTorrent(torrent: Buffer, location?: string)Adds a torrent to Deluge.
torrent: Buffer - The torrent file as a bufferlocation: string (optional) - The download locationPromise<TorrentHash>getConfig()Gets the current configuration of the Deluge client.
Promise<ConfigResult>getStatus(properties?: (keyof Torrent)[])Gets the current status of the Deluge client.
properties: (keyof Torrent)[] (optional) - List of properties to retrievePromise<StatusResult>listTorrents(torrentHashes?: TorrentHash[], properties?: (keyof Torrent)[])Lists torrents in the Deluge client.
torrentHashes: TorrentHash[] (optional) - List of torrent hashes to filterproperties: (keyof Torrent)[] (optional) - List of properties to retrievePromise<Torrents | TorrentsWithProps>removeTorrent(torrentHash: TorrentHash, removeData: boolean = false)Removes a torrent from the Deluge client.
torrentHash: TorrentHash - Hash of the torrent to removeremoveData: boolean (optional) - Whether to remove the downloaded data as wellPromise<boolean>To set up the development environment:
npm installmake dev: Run the development servermake test: Run testsmake lint: Run lintermake build: Build the projectFor testing purposes, you can use the official Deluge Docker image. To run a Deluge instance:
docker run -d \
--name=deluge \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e DELUGE_LOGLEVEL=error `#optional` \
-p 8112:8112 \
-p 6881:6881 \
-p 6881:6881/udp \
-p 58846:58846 `#optional` \
-v /path/to/deluge/config:/config \
-v /path/to/downloads:/downloads \
--restart unless-stopped \
lscr.io/linuxserver/deluge:latest
This will start a Deluge instance that the tests can use. Make sure to adjust the paths and port mappings as needed for your environment.
I'm not sure why, but this only starts working after first logging in once in the web ui (localhost:8112, default password 'deluge')
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
If you find any bugs or have feature requests, please create an issue on the GitHub repository.
FAQs
A wrapper around the deluge API.
The npm package deluger receives a total of 2 weekly downloads. As such, deluger popularity was classified as not popular.
We found that deluger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.