anacrolix / torrent

Full-featured BitTorrent client package and utilities
Mozilla Public License 2.0
5.39k stars 615 forks source link

How to config DHT listen port? #882

Closed monkeyWie closed 7 months ago

monkeyWie commented 7 months ago

Is there a way to change the fixed DHT listen port here?

anacrolix commented 7 months ago

ClientConfig.ListenPort will change the default UDP port, which is used for the default DHT servers.

https://pkg.go.dev/github.com/anacrolix/torrent#ClientConfig

monkeyWie commented 7 months ago

Thanks for reply, in my opinion this port config is used for torrent TCP listen port, do they multiplex the same port?

anacrolix commented 7 months ago

They are different protocols so they can co exist without conflict.

monkeyWie commented 7 months ago

Got it.