anacrolix / torrent

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

Add customer headers when dialling WS connection to tracker #789

Closed marcovidonis closed 1 year ago

marcovidonis commented 1 year ago

Expose a WebtorrentTrackerHttpHeader field in Client.config to let users define a function that returns an http.Header to be used in Dialer.Dial() when establishing a connection. Useful for adding authentication headers when using a private tracker, for example.

Addresses #784.

anacrolix commented 1 year ago

Fantastic, thanks!