# bittorrent-location

> get location of tracker for torrent

Latest version **1.0.0** (published 2015-07-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install bittorrent-location
pnpm add bittorrent-location
yarn add bittorrent-location
bun add bittorrent-location
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-07-31 |
| First published | 2015-07-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ichetandhembre |
| Maintainers | ichetandhembre |
| Keywords | bittorrent, tracker, udp, p2p, peer, location, bittorrent-location |

## Links

- npm: https://www.npmjs.com/package/bittorrent-location
- Repository: https://github.com/chetandhembre/node-bittorrent-location
- Homepage: https://github.com/chetandhembre/node-bittorrent-location#readme
- Issues: https://github.com/chetandhembre/node-bittorrent-location/issues
- npm.io page: https://npm.io/package/bittorrent-location

## Dependencies (4)

- [inherits](https://npm.io/package/inherits.md) ^2.0.1
- [iplocation](https://npm.io/package/iplocation.md) ^2.0.1
- [read-torrent](https://npm.io/package/read-torrent.md) ^1.3.0
- [bittorrent-udp-tracker](https://npm.io/package/bittorrent-udp-tracker.md) ^1.2.0

## Recent versions

- 1.0.0 (latest) — 2015-07-31

## README

# Bittorrent-Location

get location of tracker available for torrent file or magnet link.

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

# Features

 * support `torrent file` and `magnet link`
 * gives `latitude` and `longitude` of tracker

# Installation
```
npm i bittorrent-location --save
```

# Test
```
npm test
```

# Usage
```
var Bittorrent_Location = require('bittorrent-location')

var bittorrentLocation = new Bittorrent_Location('my.torrent')

bittorrentLocation.on('update', function (location) {
  console.log(location) //location of tracker
})

bittorrentLocation.on('error', function (err) {
  console.log(err) // error
})

setTimeout(function () {
  bittorrentLocation.stop()
}, 5000)

```

# Limitation

* `stop()` call wont exit program (need assistance to find  issue)
* location related api call are limited by  [iplocation](https://www.npmjs.com/package/iplocation) which uses [freegeoip.net](http://freegeoip.net).
* currently only support `udp` trackers

# Contributions

send PR if you want some changes in module. If you are having issue then create issue.

# License

MIT

---
_Source: https://npm.io/package/bittorrent-location · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
