anacrolix / torrent

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

How to config DHT listen port? #882

Closed monkeyWie closed 1 year ago

monkeyWie commented 1 year ago

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

anacrolix commented 1 year 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 1 year 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 1 year ago

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

monkeyWie commented 1 year ago

Got it.