dht

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrateTorrent

func CrateTorrent(debug bool, verbose bool, file string, outfile string, piecesize int64, tracker string, comment string)

CrateTorrent create a torrent file

func Crawler

func Crawler(db *sql.DB, debug bool, verbose bool, threads int)

Crawler DHT

func DaemonPeers

func DaemonPeers(cfgFile string, debug bool, verbose bool, projectName string)

DaemonPeers monitor hashes in monitor table

func GetPeersLib

func GetPeersLib(db *sql.DB, debug bool, verbose bool, hash string, projectName string)

GetPeersLib gets peers from hash and insert into the database, (code based in https://raw.githubusercontent.com/anacrolix/dht/master/cmd/dht-announce/main.go)

func ScrapeTrackers

func ScrapeTrackers(db *sql.DB, debug bool, verbose bool, projectName string)

ScrapeTrackers scrape common trackers for the hashes

func SearchDHT

func SearchDHT(db *sql.DB, debug bool, verbose bool, projectName string)

SearchDHT searchs in DHT

func SearchHash

func SearchHash(db *sql.DB, debug bool, verbose bool, hash string)

SearchHash search a hash and insert peers in DB

func WorkersTorrents

func WorkersTorrents(cfgFile string, debug bool, verbose bool, file string, projectName string)

WorkersTorrents create a hashlist for the file

Types

type FileInfo

type FileInfo struct {
	Path   []string
	Length int
}

FileInfo Path and Lenght of a file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL