actually implement torrent-based sharing of tor browser

This commit is contained in:
idk
2022-02-22 20:34:48 -05:00
parent 1e21935b2a
commit f38f6c25fa
5 changed files with 171 additions and 4 deletions

View File

@ -85,7 +85,7 @@ var (
//mirror = flag.String("mirror", "http://dist.torproject.i2p/torbrowser/", "Mirror to use")
mirror = flag.String("mirror", "http://dist.torproject.org/torbrowser/", "Mirror to use")
/*onion = flag.Bool("onion", false, "Serve an onion site which shows some I2P propaganda, magnet links, your I2P mirror URL if configured")*/
/*torrent = flag.Bool("torrent", false, "Create a torrent of the downloaded files and seed it over I2P using an Open Tracker")*/
torrent = flag.Bool("torrent", false, "Create a torrent of the downloaded files and seed it over I2P using an Open Tracker")
/*ptop = flag.Bool("p2p", false, "Use bittorrent over I2P to download the initial copy of Tor Browser")*/
)
@ -233,6 +233,13 @@ func main() {
}
client.TBS.UnpackI2PAppData()
client.TBS.UnpackI2PData()
if *torrent {
log.Println("Generating I2P torrents of Tor packages")
if err := client.TBD.GenerateMissingTorrents(); err != nil {
log.Fatal(err)
}
}
if *i2pbrowser {
if err := client.TBS.RunI2PBWithLang(); err != nil {
log.Fatal(err)