Clean up ClientConfig HTTP options
- Langage dominant
- Go
- Étoiles
- 6.1k
- Forks
- 690
- Merge moyen
- 3 j 10 h
- PR mergées (30 j)
- 12
Description
There are a proliferation of HTTP related options in ClientConfig. I believe it might be possible to converge on just exposing *http.Client for each use case. *http.Client handles having custom proxies, TLS settings, redirect handling, timeouts etc.
The use cases for HTTP in anacrolix/torrent are:
- Trackers
- WebRTC
- Sources (fetching torrent files)
- Webseeds
- ??
One strong holdout against this I think is the websocket library in use for webtorrent trackers. It only takes a proxy option. However the nyooyr.io/websocket module takes *http.Client, so this could be upgraded.
Another place is resolving IPs for trackers. This is currently done manually to check against blocklists before issuing HTTP requests. I think this is still doable, but some APIs might change.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.