ReinaldoRauch
ReinaldoRauch
TTCTheo's Typesafe Cult
Created by ReinaldoRauch on 12/28/2024 in #questions
How to properly generate a PeerId/infohash and encode them in a url query string parameter?
Hello, I'm building a bittorrent client for the command line (https://github.com/reinaldorauch/bt) in Rust and I got as far as the metadata dealt with but when I try to reach a tracker server and announce my peer, they error back saying that my peer id/infohash are invalid. I'm pretty sure that is a encoding to the url problem as i created them in a way like with UInt8Array byte buffers, but the problem is that they can be any byte values and may not fall into ascii range. So I would have to use percent encoding and even using that converting back to raw bytes the result wouldnt be correct. I know this could be not the best place to ask but who knows, haha Thanks in advance.
2 replies