btpeer 0.11.0

Simple CLI tool and library to get peers from TCP/HTTP and UDP BitTorrent trackers
Documentation
# btpeer

[![dependencies](https://deps.rs/repo/codeberg/yggverse/btpeer/status.svg)](https://deps.rs/repo/codeberg/yggverse/btpeer)
[![crates.io](https://img.shields.io/crates/v/btpeer.svg)](https://crates.io/crates/btpeer)

Simple CLI tool and library to get peers from BitTorrent trackers

## Features

Commands:

* [x] Announce - return `interval`, `leechers` and `seeders` count, optional `peers` IP:port array
* [x] Scrape - return `leechers`, `peers`, `seeders` count, `info_hash` array with stats

Tracker protocols:

* [x] UDP
* [x] TCP/HTTP
* [ ] WS

Address family:

* [x] IPv4
* [x] IPv6
* [x] I2P

## Install

``` bash
cargo install btpeer
```

## Usage

Multiple `--tracker`s are supported!

``` bash
btpeer --help
```

### TCP/HTTP

``` bash
btpeer announce -t http://[202:68d0:f0d5:b88d:1d1a:555e:2f6b:3148]:6969/announce \
                -i e337a880c4d0f552bab5b437fe1208d26130ccc5
```

#### SOCKS/Tor

``` bash
all_proxy=socks5h://127.0.0.1:9050 \
    btpeer announce -t http://some.onion/announce \
                    -i e337a880c4d0f552bab5b437fe1208d26130ccc5
```

#### HTTP/I2P

``` bash
all_proxy=http://127.0.0.1:4444 \
    btpeer announce -t http://btrackrqkjp6kgelov5a3uxisis77ofxqt5nvy5hvvtoybjpmq4q.b32.i2p/announce \
                    -i e337a880c4d0f552bab5b437fe1208d26130ccc5
```
* or use just argument option: `--proxy http://127.0.0.1:4444`
* tip: use connection `--timeout` to increase defaults

### UDP

``` bash
btpeer announce -t [202:68d0:f0d5:b88d:1d1a:555e:2f6b:3148]:6969
                -i e337a880c4d0f552bab5b437fe1208d26130ccc5
```

### Dump to file

To disable colored output (e.g. by printing output to file)

``` bash
btpeer --no-color scrape -t http://[202:68d0:f0d5:b88d:1d1a:555e:2f6b:3148]:6969/scrape > file.txt
```

## Donate

Monero / XMR

```
85A5y6erLDgDTnij3GhESYHHBhqUFYbPG19qPXTv7qeL3TuLTxhN7ij4GBQHqkyYXXQMhEVjKMnFPcV9SnbtgfPa9MDe8ec
```