11 ms·
Show HN: Exatorrent – Self-hostable Torrent client written in Go
- varbhat 5y agoHello HN , I have worked on this for past few months . exatorrent is BitTorrent Client written in Go. It can be run locally or be hosted in Remote Server with good resources to use that Server as SeedBox. It is Single Completely Statically Linked Binary with Zero External Dependencies . exatorrent is simple yet feature-rich . It is lightweight and light on resources. It comes with Beautiful Responsive Web Client written in Svelte and Typescript , but thanks to documented WebSocket API of exatorrent , you can also write your own client or integrate with other services if you want to. exatorrent can operate in Optional Multi-User Mode administrated by admin user/s but it can successfully be used by Single-User as well. Torrented Files are stored in local disk of device where it's run, which are then retrievable or streamable via HTTP. I hope you like it . It's Open Source . Also HN , I am looking for Internship . If you're interested , please email me
- m3nu 5y agoLooks good. Congrats on this release! How is memory usage compared to e.g. Transmission?
- varbhat 5y agoMemory use is pretty low. It's around 5-6 MB initially and will increase as you add more torrents. Also you can measure Memory Usage and other Stats in real time in Web Client of exatorrent(also there is API for it)
- throwaway77384 5y agoLet's assume I want to run this on a Hetzner box. And let's assume all my activity is legit torrenting. Say, sharing linux distros. They are still not exactly going to be over the moon with my seedbox running on their servers, due to torrenting stigma. You can replace 'Hetzner' with any VPS service here, really. What measures can one take to 'hide' torrenting activity?
- sixhobbits 5y agoMaybe something like https://github.com/haugene/docker-transmission-openvpn https://github.com/haugene/docker-transmission-openvpn
- robcohen 5y agoDon’t see how this would help, only thing that would help is a tunnel out, like WireGuard to a VPN or less reputable provider.
- hauxir 5y agoYou can tunnel traffic through NordVPN. This is for rapidbay but should work for any service: https://github.com/hauxir/rapidbay/wiki/Setting-RapidBay-up-on-a-VPS-and-tunnel-torrent-traffic-through-NordVPN https://github.com/hauxir/rapidbay/wiki/Setting-RapidBay-up-...
- throwaway77384 5y agoHow much does this diminish performance?
- sodality2 5y agoSpeed is probably 85-95% of normal speeds. Maybe less if the speed is gigabit. Depends on servers or VPN service.
- throwaway77384 5y agoOk great, thanks :)
- beepbooptheory 5y agoMaybe I shouldn't jinx it... but I run this container on hetzner, with a proprietary vpn service, and have never had any problems for a long long time now
- koeng 5y agoVery nice! Any known limitations on number of torrents?
- varbhat 5y agoNo limitations on number of torrents .
- devops000 5y agoWhich legit activities are all you using torrent for?
- Deukhoofd 5y agoLinux distributions, downloads that are very popular, but where the servers can't keep up with it (i.e. small indie games people hosted the download links for themselves)
- throwaway77384 5y agoFunnily enough, everything possible. Everytime there is a torrent alternative to the direct download, I will choose torrent, always. But, thanks to pirating stigma, torrenting hasn't proliferated anywhere near as much as it should.
- aarchi 5y agoInternet Archive collections are available as web seed torrents and download much faster than over HTTP because multiple servers are used concurrently.
- wiz21c 5y agoraspbian download
- ducktective 5y agoPossible legit usage: https://academictorrents.com/ https://academictorrents.com/
- freedomben 5y agoI seed all linux distros that I use. Bandwidth is expensive when centralized. It pains me to think of dollars going toward paying for egress data rather than developer work for open source projects. Please download them via torrent instead of http, and then please seed!
- mishafb 5y agoIsn't most of the bandwidth spent on packages? Even immediately after the initial install you probably have gigabytes of updates + new packages.
- vxNsr 5y agoAmazing impressive work! Was there a specific reason you built this or did you just want to create a showcase?
- varbhat 5y agoI built this as a project to learn things. I used to dislike myself for not being productive. exatorrent helped me to learn new things ( go , databases , typescript , websocket , CI/CD ,etc.). so,here it is.
- toomuchtodo 5y agoYou have done an exceptional job. Congrats on the productivity!
- varbhat 5y agoThank you. I hope you like it.
- vxNsr 5y agoReally impressive! I have the same issue, its pretty motivating to see this. How long did it take you?
- newman314 5y agoWhat could be interesting is if you were able to add wireguard-go into your project. It would be nice to have a single binary that can run traffic through a VPN and something I have not see done before.
- varbhat 5y agoNice. I will consider. You can route network of exatorrent through network/VPN . Also, wireguard implemented in Linux kernel is faster than userspace implementation of wireguard-go . No?
- y4mi 5y ago> You can route network of exatorrent through network/VPN . that always comes with the danger of not going through VPN if the connection somehow drops or you've restarted the machine its running on and the vpn started after the torrent client. and the linux kernel implementation isnt necessarily available if its running in a docker container of some NAS or even on a windows machine. it would also make it easier to use, allowing more people to utilize the tech.
- varbhat 5y agoThanks for suggesting me. I will consider this.
- HansHamster 5y ago> that always comes with the danger of not going through VPN if the connection somehow drops or you've restarted the machine its running on and the vpn started after the torrent client. My current setup uses namespaces to avoid this issue. Basically, one can create a wg interface in the default namespace and then move it to a new namespace and run applications there. The wg interface keeps routing the encrypted traffic through the interfaces in the default namespace, but as there is only the wg interface in the new namespace, there is no risk of leaking any traffic. It also doesn't need a network bridge and doesn't disturb the network configuration of the host. I use lxc, but there are probably more lightweight options to just start an application in a different network namespace. See: https://www.wireguard.com/netns/ https://www.wireguard.com/netns/
- majkinetor 5y agoPlease create Windows binary. Is it possible to control it via web interface ?
- varbhat 5y agoYes, it is possible to control it via web interface. I wanted to create Windows executable. I tried cross compiling using mingw and asked my friend to test it but it reported some error namely libstdc++ error and similar ones. So,i focussed first on releasing software first and look into this issue later. I also wanted to release Binary for MacOS too ,so went to setup osxcross cross compiler but couldn't setup it properly too. I wanted to work on this after release. So, Help is appreciated regarding this matter.
- deleted 5y ago[deleted]
- Qem 5y agoI used to torrent a lot, but gave up after my ISP adopted CGNAT and I lost the capability to forward ports locally. Do people adapted bittorrent to IPv6, since then, to circunvent this problem, or are we still stuck with IPv4 in this space?
- dmos62 5y agoI'm a newby in these topics. I'm pretty sure that bittorrent has worked in ipv6 for a long time now; actually, I find it unintuitive that it would care whether one or the other is used. Also, doesn't bittorrent work fine without port forwarding? I'm pretty sure that I used to run it that way for a long time when my ISP didn't give me a public IP.
- Qem 5y agoIt works, but the number of peers and speeds decrease a lot. At least in my experience. I haven't deep knowledge on how the protocol works.
- Anunayj 5y agoPort forwarding will allow you to receive connections from clients that are themselves behind NATs, and would also allow you to participate in DHT which would allow you to discover clients faster. Though in ideal cases (ones with high active seeders), that isn't going to affect performance that much. Torrent can also use UDP hole punching, but that can sometimes be finnicky behind CGNATs
- louis-lau 5y agoCorrect. At least one side must have an open port. So if that's you you can peer with everyone instead of only people with open ports.
- no_time 5y agoPeople torrent just fine behind CGNAT though? I never understood how hole punching works but im pretty sure the protocol has something like that.
- yodsanklai 5y agoImpressive work. Did you implement the bittorrent protocol from scratch? which BEP specifically? https://www.bittorrent.org/beps/bep_0000.html https://www.bittorrent.org/beps/bep_0000.html
- varbhat 5y agoNo , I used https://github.com/anacrolix/torrent https://github.com/anacrolix/torrent to build exatorrent
- eternalban 5y agoYou should add a NOTICE file to your repo, stating the fact that you have used portion of `anacrolix/torrent` OSS software: https://github.com/anacrolix/torrent/blob/master/LICENSE https://github.com/anacrolix/torrent/blob/master/LICENSE
- varbhat 5y agoDone . https://github.com/varbhat/exatorrent/blob/main/NOTICE.txt https://github.com/varbhat/exatorrent/blob/main/NOTICE.txt
- creamytaco 5y agoHere is some advice I hope you find useful: I wouldn't hire you based on this because all I see is a shit ton of 3rd party libraries stitched together. The exact opposite of what I would like to see in a good engineering candidate. So you may want to rethink your approach in terms of putting forth qualities that speak to your engineering prowess. I also wouldn't personally use this software as it has so many 3rd party dependencies that one would find it hard to audit or make any robustness / security guarantees.
- varbhat 5y agoThank you . Please Open Issue if you find any Bad or Buggy Code . I would correct it. Also , exatorrent doesn't use much 3rd party libraries like you think
- 19h 5y agoVery cool project. I’d love to see more Go projects pop up because they’re absolutely great to learn Go. Have you had a chance to benchmark the maximal throughput? (I.e. 100MB/s on a 1Gbps max?) I’ve been using Synapse (https://synapse-bt.org/synapse/ https://synapse-bt.org/synapse/, a torrent client written in Rust) recently and so far it was the only client fully saturating a 10Gbps NIC.
- varbhat 5y agoI didn't benchmark the maximal throughput although I may in future .
- johnchristopher 5y agojohnchristopher@localhost ~/Download $ ./exatorrent-linux-amd64 Address => :5000 Directory => exadir [INFO] 2021/08/25 22:48:04 Adding Admin user with username "adminuser" and password "adminpassword" [INFO] 2021/08/25 22:48:05 Torrent Client Created [INFO] 2021/08/25 22:48:05 Starting server on :5000 [INFO] 2021/08/25 22:48:05 Loaded 20 trackers from https://ngosang.github.io/trackerslist/trackers_best.txt [INFO] 2021/08/25 22:48:05 Loaded 20 trackers in total , eliminating duplicates [INFO] 2021/08/25 22:48:05 Added Loaded Trackers to Torrents Extra points for logging relevant info when first starting it up and not taking me on a hunt in a readme or something :).
- varbhat 5y agoThank you. I hope you like exatorrent
- Aissen 5y agoHmmm, had a look, and the default listen address + default user / password are giving me shivers. @varbhat I'd advise you to change the default listen address from ":5000" to "127.0.0.1:5000" to only allow local connections. And maybe generate a password then for good measure, since you're printing it anyway :-)
- chakkepolja 5y agoI think he intends that it can be used as a seedbox. It can be a command line switch, though.
- throwaway_2047 5y agoTangential, I think adding support of http://webtorrent.io/ http://webtorrent.io/ by bridging webtorrent peer with bittorent peer would greatly increase/revive the popularity of the protocol
- varbhat 5y agoexatorrent supports webtorrent peers already
- throwaway_2047 5y agoDidn't know. Savage! Good luck and wish you success!
- southerntofu 5y agoThat's great news! Is it designed to reusable as a library, for example to build a peertube native desktop client?
- varbhat 5y agoYou can use https://github.com/anacrolix/torrent https://github.com/anacrolix/torrent for those cases.
- Arnavion 5y agoThere are non-"self-hostable" torrent clients?
- rahimnathwani 5y agoYes, you can download torrents with Baidu Wangpan (https://pan.baidu.com/ https://pan.baidu.com/) which cannot be self-hosted. AWS S3 used to have torrent client (seed-only), which could not be self-hosted.
- Arnavion 5y agoSeed-only clients that can't be self-hosted, I can understand, because what you care about is not the client but the infrastructure that the client runs on (network, etc). What's the use-case of Wangpan? I assume it's not "I don't want to torrent illegal things on my home network" because such a service could rat me out just as well.
- rahimnathwani 5y agoBaidu Wangpan is a dropbox-like service, that has torrent download as a small feature. Imagine you want to stream a video file on your mobile, but: 1) The video file is only available via a torrent along with other files you don't want to watch right now, and 2) Your internet connection doesn't have great throughput, and 3) You will watch the file on a mobile device, so can compromise on resolution and compression. The easiest thing would be to download the torrent on Baidu Wangpan, and then stream the parts you want to your mobile device.
- m-p-3 5y agoThat looks great, the only think that would make it even better for me would be a section to monitor RSS feeds and automatically download torrents from a set of rules into specific directories (preferably with the ability to unpack the download if the original files are compresses/splitted). But that probably goes beyond the scope of this project. Very cool nonetheless!