anacrolix / anacrolix/torrent

Clean up ClientConfig HTTP options

Đang mở
#864 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
6.1k
Fork
690
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
12

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.