Sign inSign up

gaojianli2333/trunker

By gaojianli2333

•Updated 2 months ago

A high-performance BitTorrent tracker written in go. https://github.com/PBH-BTN/trunker

Image
Networking
0

8.5K

gaojianli2333/trunker repository overview

⁠Trunker

A Tracker which will "chuang" you

image

⁠Introduce

A BitTorrent Tracker implemented in Go. Using Hertz⁠ from cloudwego.

This tracker is hosted as https://btn-prod.ghostchu-services.top/announce⁠

⁠How to run

./build.sh
cd output
./bootstrap.sh

⁠Features

  • BEP-0003
  • BEP-0007
  • BEP-0023
  • BEP-0024
  • BEP-0031
  • BEP-0048
  • LT-Extension(complete,incomplete)
  • Full-Memory Mode
  • Load from Persist
  • MySQL Mode

⁠Configuration

NameDescriptionDefault
ttlThe time of a peer announce next time.3600s
invervalTaskThe interval of the task to clean the expired peers.600s
useDBUse the database to store the data. (currently no usable)false
enablePersistSave the peers to the disk and load them while launching.true
maxPeersPerTorrentThe max number of peers per torrent.100
shardThe number of shards. More shards will improve response time, by cost more memory.16
useUnixSocketUse Unix Socket instead tcpfalse
hostPortsThe host and port of the server, For unix socket mode, this is the file name of the sock file.127.0.0.1:8888
useAnnounceIPAllow peer to announce its IP in the query string.true
enableEventProducerSend peer event to the mq. Caution: This will produce tons of message.false

⁠Benchmark

CPU: 4 Cores ARM64 Oracle Cloud

Average response time: 600ms when 30K torrents and 27K peers are online.

QPS: 700~

Memory Cost: 348MB.

image

Tag summary

Content type

Image

Digest

sha256:c6e313f96…

Size

41.6 MB

Last updated

2 months ago

docker pull gaojianli2333/trunker