Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 01 12:52

    anacrolix on master

    Increase request update interva… (compare)

  • Aug 01 12:10

    anacrolix on master

    cmd/torrentfs: Fix panic on mis… Precompute File.DisplayPath Th… Minimize allocations and resizi… (compare)

  • Aug 01 05:48

    anacrolix on v1.29.2

    (compare)

  • Aug 01 05:47

    anacrolix on master

    Trim UDP tracker client read al… (compare)

  • Aug 01 05:45
    anacrolix commented #523
  • Aug 01 05:44
    anacrolix edited #523
  • Aug 01 05:44
    anacrolix edited #523
  • Jul 31 01:19
    anacrolix commented #462
  • Jul 31 00:57
    anacrolix commented #534
  • Jul 31 00:56
    anacrolix commented #534
  • Jul 31 00:56
    anacrolix commented #537
  • Jul 30 11:02
    YenForYang commented #537
  • Jul 30 10:58
    YenForYang synchronize #537
  • Jul 30 10:48
    YenForYang commented #537
  • Jul 30 10:38
    YenForYang commented #537
  • Jul 26 09:44
    YenForYang opened #537
  • Jul 26 09:01
    YenForYang commented #535
  • Jul 26 08:51
    YenForYang closed #535
  • Jul 26 08:51
    YenForYang commented #535
  • Jul 26 08:21
    anacrolix commented #534
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 ?
Matt Joiner
@anacrolix
@Akshay090 there are, they're separate and/or private projects, see https://github.com/anacrolix/torrent#downstream-projects
ctwyw
@ctwyw
@anacrolix Hi again, I can already download the magnet. these is another question. I build serval server on the PublicIP4 and then build two client behind the NAT router . but could not see them in the DHT node. UNPN is start already. the clients can not share with each other.but the server work well yet. What can I do in this case ?
Listening on 0.0.0.0:63333
Nodes in table: 5 good, 5 total
Ongoing transactions: 0
Server node ID: e0cb86882625a25b8a83002f21cd1f5c46*****

b# node id                                  addr                 anntok last query last response cf
0  2572c85bdb9e52254e629285f7eb329075e***** *.*.*.*:40001  20     never      46s ago       0
0  1a6e0b237b73a79091efd6ca8572c06c9fa***** *.*.*.*:40002  20     never      45s ago       0
1  ae614ab3fc2288a8607fb5264e1cef6d7b4***** *.*.*.*:40002   20     never      45s ago       0
1  9d415d2479966acd83c3b3446cbb97a209f***** *.*.*.*:40002 20     never      45s ago       0
1  9730ca99ccae7eb8d243846063fe951326f***** *.*.*.*:40002    20     never      45s ago       0
ctwyw
@ctwyw
I saw this in the torrent status
error announcing: reading from socket: read udp4 192.168.199.229:64718->*:40002: i/o timeout
Yaroslav Kolomiiets
@yarikk
@anacrolix , I just noticed anacrolix/torrent@c1d189e, how much of a performance gain did the change allows to get? I'm also exploring ways to speed it up
Matt Joiner
@anacrolix
replied in github
imadr
@imadr
Hello, is there a way to specify what directory each torrent is downloaded to, instead of putting them all in ClientConfig.DataDir?
Matt Joiner
@anacrolix
Yes, provide a custom storage at the Client level, or to each Torrent when you add it.
Yaroslav Kolomiiets
@yarikk

@imadr, indeed, like this:

    spec := torrent.TorrentSpecFromMetaInfo(meta)
    compl := storage.NewMapPieceCompletion()
    spec.Storage = storage.NewMMapWithCompletion(dstDir, compl)
    tt, _, err := client.AddTorrentSpec(spec)

(there are options of storage and completion backends to choose from)

imadr
@imadr
thanks!
imadr
@imadr
I'm not able to delete the torrent files even after it finishes, the error from os.RemoveAll is "Access is denied."
Here is an example https://pastebin.com/raw/gKLkq8bk
Also this only happens on windows
Matt Joiner
@anacrolix
@imadr you are not closing the mmap storage before trying to remove the files. On Windows you cannot remove files that are being held open.
imadr
@imadr
It's working, thx
imadr
@imadr
Oops nevermind I talked too soon, it's still saying access denied. I also closed the PieceCompletion for good measure but same, am I doing it wrong?
c := torrentStorage.NewMapPieceCompletion()
mmap := torrentStorage.NewMMapWithCompletion(torrentPath, c)
s.Storage = mmap
...
c.Close()
mmap.Close()
t.Drop()
Matt Joiner
@anacrolix
You should release resources in the reverse order that you allocate them. I'll need more info to help further, can you check for errors returned from those clean-up functions? Could you add a time.Sleep after the clean-up before trying to remove the files in case there's a timing bug? Also run with the race detector enabled.
imadr
@imadr
Here is what I tried https://pastebin.com/raw/EYebt4vr same access denied error and no errors when closing the resources
I also tried with go run -race main.go but nothing changed
Matt Joiner
@anacrolix
@imadr I did some thorough static analysis on MacOS. No files remained memory mapped in the directory you're deleting. I was using github.com/anacrolix/torrent v1.19.2 with your code.
gitpubber
@gitpubber
Matt joiner , I have client with DataDir set to a path
But,i have this case where i need to download torrent to different path
how can i do?
I know of storage.ClientImpl but i am not proficient to do it
gitpubber
@gitpubber
hey,thank you very much
gitpubber
@gitpubber
@anacrolix If i enable webseed in config,is it enough?
Or should I do anything extra to enable webseeding?
@anacrolix I must get pieces completed and total no of pieces .Is there any function for it?
Ok,I got about pieces. no need to answer that
Matt Joiner
@anacrolix
@gitpubber nothing extra should be required for webseeding
AlexSpain
@AlexSpain
hi all
how I can disable ipv6
at torrent?
AlexSpain
@AlexSpain
any help please?
@anacrolix ?
Matt Joiner
@anacrolix
Use DisableIpv6 in ClientConfig.
gitpubber
@gitpubber
@anacrolix I want to change Upload and Download Limiter of Client while Client is running
How can I do it?
I don't want to restart the client
Please help
gitpubber
@gitpubber
Is there something that I can do to change ClientConfig while Client is running ?
gitpubber
@gitpubber
Please help @anacrolix
I want to be able to change DownloadLimiter , UploadLimiter , DisableIpv6 , DisableTrackers while Torrent Client is running
Matt Joiner
@anacrolix
Submit an issue please. I think i may have answered some of this by email.
Matt Joiner
@anacrolix
Yonatan Bebchuk
@HerrBebczuk_gitlab
Hello,
Me and my team are trying to install anacrolix/torrent ( go get github.com/anacrolix/torrent ). On two of our computers, one on a linux VM and the other on windows we get the same errors. The errors are as follows:
# github.com/anacrolix/missinggo/prioritybitmap
../../../github.com/anacrolix/missinggo/prioritybitmap/prioritybitmap.go:141:15: cannot use func literal (type func(int) bool) as type func(uint32) bool in argument to me.IterTyped
../../../github.com/anacrolix/missinggo/prioritybitmap/prioritybitmap.go:151:12: cannot use i (type int) as type uint32 in argument to _f
# github.com/pion/srtp
../../../github.com/pion/srtp/session_srtp.go:144:9: assignment mismatch: 1 variable but h.Unmarshal returns 2 values
../../../github.com/pion/srtp/srtp.go:37:9: assignment mismatch: 1 variable but header.Unmarshal returns 2 values
../../../github.com/pion/srtp/srtp.go:52:9: assignment mismatch: 1 variable but header.Unmarshal returns 2 values
../../../github.com/pion/srtp/srtp.go:56:51: header.PayloadOffset undefined (type *rtp.Header has no field or method PayloadOffset)
../../../github.com/pion/srtp/srtp_cipher_aead_aes_gcm.go:99:13: header.PayloadOffset undefined (type *rtp.Header has no field or method PayloadOffset)
../../../github.com/pion/srtp/srtp_cipher_aead_aes_gcm.go:104:18: header.PayloadOffset undefined (type *rtp.Header has no field or method PayloadOffset)
../../../github.com/pion/srtp/srtp_cipher_aes_cm_hmac_sha1.go:121:30: header.PayloadOffset undefined (type *rtp.Header has no field or method PayloadOffset)
../../../github.com/pion/srtp/srtp_cipher_aes_cm_hmac_sha1.go:126:32: header.PayloadOffset undefined (type *rtp.Header has no field or method PayloadOffset)
../../../github.com/pion/srtp/stream_srtp.go:88:6: assignment mismatch: 1 variable but header.Unmarshal returns 2 values
They occur in the two packages above -- anacrolix/missinggo/prioritybitmap & pion/srtp. My team has looked into one of the errors in pion/srtp and have found that these errors exist in all released tags. The error we found in both tags is that the Header struct in pion/rtp has an Unmarshal function which returns two values, and in srtp it is assigned to a single value.
We have tried updating the package many times and in various combinations.
We are sure that the problem we are facing is a silly one since so many of you have been able to install and use this library. Is any one familiar with the problems we are facing?
Many thanks from the brattle team!
Denis
@elgatito
@HerrBebczuk_gitlab what Go version?
Matt Joiner
@anacrolix
And are you using Go modules? Please feel free to move this issue to GitHub Discussions or Issues.
Yonatan Bebchuk
@HerrBebczuk_gitlab
Thanks for the quick response,
I opened a discussion in GitHub.