Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 03 09:36

    anacrolix on master

    Fix minimum peer extensions err… (compare)

  • Dec 03 05:42

    anacrolix on request-strategy-experiments

    Don't try to request anything w… (compare)

  • Dec 02 09:23

    anacrolix on zombiezen-sqlite

    (compare)

  • Dec 02 09:23

    anacrolix on udp-tracker-no-dial

    (compare)

  • Dec 02 09:23

    anacrolix on bsi-pending-requests

    (compare)

  • Dec 02 09:22

    anacrolix on te

    (compare)

  • Dec 02 09:22

    anacrolix on request-strategy-experiments

    Ensure peerRequests.torrentStra… Filter update requests on piece… Remove unused torrent_pending_p… and 18 more (compare)

  • Dec 02 09:13

    anacrolix on master

    Use zombiezen branch of squirrel Remove CGO build flags for pure… Don't dial in UDP tracking Thi… and 18 more (compare)

  • Dec 02 09:06

    anacrolix on te

    Merge branch 'bsi-pending-reque… Rename worst_conns.go Abstract worseConn comparisons … and 29 more (compare)

  • Nov 26 06:06

    anacrolix on zombiezen-sqlite

    Use modernc.org/sqlite version … (compare)

  • Nov 25 12:00

    anacrolix on master

    Use zombiezen sqlite for piece … gofumpt Doc comments (compare)

  • Nov 25 11:59

    anacrolix on bsi-pending-requests

    Revert "Use a flat slice for pe… Comment out pending requests te… (compare)

  • Nov 22 21:37

    anacrolix on udp-tracker-no-dial

    Wrap UDP tracker response error Improve logging of UDP tracker … tracker/udp: Panic on read erro… (compare)

  • Nov 22 09:25

    anacrolix on udp-tracker-no-dial

    Doc comments Don't dial in UDP tracking Thi… (compare)

  • Nov 19 09:29

    anacrolix on zombiezen-sqlite

    Remove CGO build flags for pure… (compare)

  • Nov 19 09:10

    anacrolix on zombiezen-sqlite

    Use zombiezen sqlite for piece … gofumpt Use zombiezen branch of squirrel (compare)

  • Nov 19 02:03

    anacrolix on master

    Quote peer extension names to e… (compare)

  • Nov 18 05:55
    anacrolix commented #392
  • Nov 17 03:24

    anacrolix on master

    Avoid calling net.Conn methods … Optimize PeerConn.peerHasAllPie… Pull synchronous firewall callb… (compare)

  • Nov 16 07:31
    anacrolix closed #689
Matt Joiner
@anacrolix
it would require a different piece selection strategy to optimize that case, but you might just want to use the reader's default prioritization instead (unless you want to write a new request strategy that handles this case)
Matt Joiner
@anacrolix
@i96751414 one easy way to achieve more responsive changes to priorities, is to reduce the max outstanding requests
see connection.nominalMaxRequests
i96751414
@i96751414
Ok. I see the problems I am having are related with the requestStrategy
i96751414
@i96751414
I will try different approaches and see.
Yaroslav Kolomiiets
@yarikk
@anacrolix bits in missinggo/v2 depend on missingo/v1 – is that by design?
Matt Joiner
@anacrolix
@yarikk It's not really a problem, but feel free to flag them by creating issues on missinggo. I think I prematurely moved to version 2 on that repo, instead I should have created submodules, or broken out new repos.
James
@james-lawrence
@anacrolix re: api simplification, I did open an issue over a year ago in 2018, very little movement in the discussion about what would be acceptable.
the PR was suppose to give you an actual implementation to comment on, so we could work towards somethnig
if you provide no actionable feedback it makes it very difficult to help improve the library. saying open with smaller PRs is not actionable, the PR was a minimum subset of the changes mainly around usability of the library while still delivering working code.
James
@james-lawrence
if you have suggestions about how to break it up into even smaller useful chunks feel free. only part I feel can be dropped is the metrics rename. but that is just an artifact of the refactor, couple minor changes can dorp that change all together.
there is followup work internal to the library around the locks and the download interface that can be done that i didn't include to keep the PR smaller for the first pass
Matt Joiner
@anacrolix
@james-lawrence let's address this in #243.
Meghan
@nektro
if ClientConfig.Seed is true and the folder of a torrent's data get's moved/renamed to a new location, will the torrent continue to seed
Matt Joiner
@anacrolix
Not unless you tell the Client about it
It will probably discover the data is missing while trying to upload, and mark those pieces as missing. Unless you tell it to download again, or you have a storage that can handle moving the data, it won't know about it.
Meghan
@nektro
thanks
was wondering if there were any filesystem listeners to check, but thats still workable
Matt Joiner
@anacrolix
it should be possible to do this stuff transparently to the client in the storage backend if you want to make a custom implementation
Benaich mohamed
@benaich
Hello there,
Is possible to download only a portion of a video using torrent ?
i'm trying to do it with reader.Seek no luck yet :/
Jian Zhu
@zhujian0805
If i build my binary on linux with kernel 3.x and run it on kernel 5.x, will there be problem?
I build on 3.10.0-327.13.1.el7.x86_64 but run it on 5.2.8-1.el7.elrepo.x86_64
Jian Zhu
@zhujian0805
I got those errors on one of my hosts
Matt Joiner
@anacrolix
@benaich yes, this is supported.
@zhujian0805 more than likely, the *Torrent is nil, you probably haven't initialized it correctly. try running the unit tests, and using cmd/torrent to rule out other issues.
Jian Zhu
@zhujian0805
@anacrolix thanks, will try
Jian Zhu
@zhujian0805
It's interesting that my torrent client downloaded all files and exits from shell, right after that my application complains:it fails to open files.
Jian Zhu
@zhujian0805
looks like i didn't call Drop after downloading
Jian Zhu
@zhujian0805
i need to move the downloaded files, then the application can read it even the, not sure why
Loukas Litsos
@lkslts64
Hi there, I was wondering if the library caps the number of simultaneous uploads per torrent.(https://wiki.theory.org/index.php/BitTorrentSpecification#Choking_and_Optimistic_Unchoking). I took a look at the source but didn't find anything relevant.A remote peer is choked if the client has uploaded 100KiB more than he has downloaded from him (connection.uplloadAllowed method) but I think this doesn't guarantee any limit to the number of peers we are simultaneously uploading to. Is it something that I am missing? thanks
Matt Joiner
@anacrolix
@lkslts64 no, there's no limit to the number of peers uploaded to simultaneously
Loukas Litsos
@lkslts64
ok thanks. Anyways, besides this, I recently developed my own bittorrent client in Go, just for learning/fun, so I ended up looking a lot your project to clarify some things. I was amazed by the quality of the code! I am relatively new in programming so this was the first Go project I digged into but again I don't think that others provide such code quality by leveraging all Go's features and idioms. So thanks for this experience!
Matt Joiner
@anacrolix
@lkslts64 I wish I could say it was all good, but a lot of it is inconsistent, and I'd do a lot differently in hindsight.
ctwyw
@ctwyw
Hi there, Is there any example to building dht server or tracker server ?
Matt Joiner
@anacrolix
@ctwyw you're welcome to peruse anacrolix/dht and the tracker-related parts of anacrolix/torrent.
Jian Zhu
@zhujian0805
i intermittently get those errors, not sure why
https://paste.ubuntu.com/p/bHxGzMWczg/
Jian Zhu
@zhujian0805
sometime it can download successfully, sometime not :(
ctwyw
@ctwyw
@anacrolix I`ve success to build server and client. It was success when use the same torrent file . but if my client use the magnet of that torrent , it was failure. how can I download by using magnet ?
I use [ torrent-magnet < 2.torrent ] to create the magnet , is this right ?
Matt Joiner
@anacrolix
@zhujian0805 sorry for the delay. what errors do you refer to? there are none in that log file
@ctwyw would your network have UDP issues? it's likely your DHT is failing to find peers, or not working at all. are you behind a NAT router? does the magnet link that is created contain any trackers? do you want to PM the link or share it here?
Yaroslav Kolomiiets
@yarikk
@anacrolix krpc.CompactIPv4NodeAddrs (or NodeAddr) does not have the essential To4() piece in its marshaller functions, unlike pp.CompactIp which does. Hence the need to do the dance at the use sites – in particular, the PEX implementation.
Yaroslav Kolomiiets
@yarikk
Yaroslav Kolomiiets
@yarikk
@anacrolix why do we need tt.DownloadAll()? In essence, it calls updatePiecePriority() for every piece. We could do it from onSetInfo() along with updatePieceCompletion() – what do you think?
Loukas Litsos
@lkslts64
@anacrolix Hi again, I can see that in the torrent package you don't make heavy usage of channels. Instead you prefer the sync package. That choice was made for performance reasons or you think that channels don't fit well in this particular application? What made you choose the sync package as the primary synchronization mechanism? Moreover, what would you do differently if you had to make this package again? Thanks in advance and sorry for this type of questions but I would like to hear your thoughts.
Matt Joiner
@anacrolix
@yarikk It's a convenience method from back when the client was first written. anacrolix/torrent does not download on start-up, that's intentional. You must raise the piece or file priorities yourself, or use a torrent.Reader to prompt the client to start downloading.
@lkslts64 Like a lot of people I was sucked in to Go partly due to channels. Channels only work in some simplified situations, they don't handle prioritization of events, they don't combine well with other forms of synchronization, and they don't perform as well (such as requiring huge numbers of goroutines in some situations). I don't think I would switch to channels if I were to do it again, in fact I'd probably use another language like Rust instead. FWIW, teh project was in Python in 2012, and quickly moved to Go.
Loukas Litsos
@lkslts64
@anacrolix Thats right I agree with you. I asked you because in my own BT client, I started up using channels and then realized that the complexity of the code was huge. I was so frustrated by the annoying deadlocks that were happening merely because of the need of bidirectional communication between the channels (N connection goroutines communicating bidirectionally with 1 torrent goroutine). Moreover, channels don't fit well when a connection wants to decide which pieces to download so I ended up using the sync package too and it was much more simplified that way. On the other hand, my implementation avoids having a global lock which improves scalability and also channels cooperate well with the timers and tickers in the time package. But, in conclusion if I were to do it again, I woudn't choose them for sure, the sync package is way more flexible. Another man that fell into the channel overuse trap...
Akshay Ashok
@Akshay090
How can we use a web UI to interact with this library, i saw confluence ( interact with Http) so was wondering if there is some website ui to interact with this ?