Clean up ClientConfig HTTP options
- Lenguaje dominante
- Go
- Estrellas
- 6.1k
- Forks
- 690
- Merge medio
- 3 d 10 h
- PR fusionados (30 d)
- 12
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.