all: cut bloated HTTP-client and tuning options

This is a personal torrent client, not a web client or daemon, so the
rarely-used HTTP-client knobs and redundant tuning flags are gone — flag,
config field, implementation, and tests removed for each. The option
surface drops from 54 to 28.

Web-client cluster removed: --all-proxy (HTTP_PROXY env still works),
load/save-cookies, --referer, -U/--user-agent, --http-user/--http-passwd,
--conditional-get, --remote-time, --check-certificate, --ca-certificate,
--lowest-speed-limit. Pass --header for a one-off auth/cookie/UA header.

Redundant knobs removed: -x and -k (folded into -s), --connect-timeout,
--retry-wait, per-item --max-download-limit/-u, --bt-max-peers,
--bt-stop-timeout, --disable-ipv6, --auto-save-interval, --human-readable,
--stop, -T (a positional .torrent works). follow-torrent and human-readable
are now unconditional defaults.
This commit is contained in:
2026-06-22 08:30:12 +09:00
parent 2afcb861e4
commit cf9082ff72
15 changed files with 157 additions and 1053 deletions

View File

@@ -43,11 +43,9 @@ func TestSingleShortBody(t *testing.T) {
out := filepath.Join(dir, "file.bin")
d := New([]string{srv.URL + "/file.bin"}, Config{
Dir: dir,
Out: "file.bin",
MaxConnPerServer: 1,
Tries: 1, // a single attempt so the retryable short read surfaces, not loops
UserAgent: "got-test",
Dir: dir,
Out: "file.bin",
Tries: 1, // a single attempt so the retryable short read surfaces, not loops
})
err := d.single(context.Background(), out)
@@ -75,11 +73,9 @@ func TestSingleCompleteFullBody(t *testing.T) {
out := filepath.Join(dir, "file.bin")
d := New([]string{srv.URL + "/file.bin"}, Config{
Dir: dir,
Out: "file.bin",
MaxConnPerServer: 1,
Tries: 1,
UserAgent: "got-test",
Dir: dir,
Out: "file.bin",
Tries: 1,
})
if err := d.single(context.Background(), out); err != nil {