webtorrent / bittorrent-tracker

🌊 Simple, robust, BitTorrent tracker (client & server) implementation
https://webtorrent.io
MIT License
1.72k stars 314 forks source link

d14:failure reason17:invalid info_hashe #476

Closed tkbstudios closed 10 months ago

tkbstudios commented 1 year ago

What version of this package are you using?
10.0.10

What operating system, Node.js, and npm version? Docker jarylc/bittorrent-tracker:10.0.10

What happened? I have this example hash generator in python:

hash_string = "abcd"
info_hash = hashlib.sha1(hash_string.encode()).hexdigest()
print(info_hash)

peer_id = "PEER-" + str(uuid.uuid4())
port = 2023
print(peer_id)

The generated hash looks like this: 81fe8bfe87576c3ecb22426f8e57847382917acf
The generated peer ID is PEER-4c9d1a12-a09b-42f5-98fd-26679d8022a3

My request method:

params = {
    "info_hash": info_hash,
    "peer_id": peer_id,
    "port": port,
    "uploaded": "0",
    "downloaded": "0",
    "compact": "1",
    "left": "0"
}
response = requests.get(tracker_url, params=params)

tracker_url is http://site.net:2023/announce

And I still get "d14:failure reason17:invalid info_hashe" as response

What did you expect to happen? Announce as a peer to the tracker.

Are you willing to submit a pull request to fix this bug? If I knew what makes this not work, I would.

github-actions[bot] commented 10 months ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?