From 5664110fd9e91eaedec26096b283b473f731fae2 Mon Sep 17 00:00:00 2001 From: coffeeneed Date: Sun, 15 Mar 2026 15:13:42 +0100 Subject: [PATCH 1/3] feat(client): add qbit-5.1.4 client support --- README.md | 2 +- emulation/static/qbit-5.1.4.json | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 emulation/static/qbit-5.1.4.json diff --git a/README.md b/README.md index 6ba64ec..ab105a7 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ required arguments: and must be in %, b, kb, mb, gb, tb and must be in kbps, mbps -[CLIENT_CODE] options: qbit-4.0.3, qbit-4.3.3 +[CLIENT_CODE] options: qbit-4.0.3, qbit-4.3.3, qbit-5.1.4 ``` ``` diff --git a/emulation/static/qbit-5.1.4.json b/emulation/static/qbit-5.1.4.json new file mode 100644 index 0000000..79eb3cc --- /dev/null +++ b/emulation/static/qbit-5.1.4.json @@ -0,0 +1,17 @@ +{ + "name": "qBittorrent v5.1.4", + "peerId": { + "regex":"-qB5140-[A-Za-z0-9_~\\(\\)\\!\\.\\*-]{12}" + }, + "key": { + "generator": "defaultKeyGenerator" + }, + "rounding": { + "generator": "defaultRoudingGenerator" + }, + "query": "info_hash={infohash}&peer_id={peerid}&port={port}&uploaded={uploaded}&downloaded={downloaded}&left={left}&corrupt=0&key={key}&event={event}&numwant={numwant}&compact=1&no_peer_id=1&supportcrypto=1&redundant=0", + "headers": { + "User-Agent": "qBittorrent/5.1.4", + "Accept-Encoding": "gzip" + } +} From 5a588ade4fe1eb6f3cbf283a7d46573365945c00 Mon Sep 17 00:00:00 2001 From: coffeeneed Date: Sun, 15 Mar 2026 15:35:21 +0100 Subject: [PATCH 2/3] fix: add helper for main.go --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index b79ae63..1a06127 100644 --- a/main.go +++ b/main.go @@ -41,7 +41,7 @@ required arguments: and must be in %, b, kb, mb, gb, tb and must be in kbps, mbps -[CLIENT_CODE] options: qbit-4.0.3, qbit-4.3.3 +[CLIENT_CODE] options: qbit-4.0.3, qbit-4.3.3, qbit-5.1.4 `) } From 81129844551332650ef8be1a29ae7512bfdff8d4 Mon Sep 17 00:00:00 2001 From: coffeeneed Date: Sun, 15 Mar 2026 15:46:23 +0100 Subject: [PATCH 3/3] fix: update test to use newest qbit version --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3fc2e67..258b668 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ test: go test ./... -count=1 --cover torrent-test: - go run main.go -c qbit-4.3.3 -t bencode/torrent_files_test/debian-12.0.0-amd64-DVD-1.iso.torrent -d 0% -ds 100kbps -u 0% -us 100kbps + go run main.go -c qbit-5.1.4 -t bencode/torrent_files_test/debian-12.0.0-amd64-DVD-1.iso.torrent -d 0% -ds 100kbps -u 0% -us 100kbps release: @if test -z "$(rsversion)"; then echo "usage: make release rsversion=v1.2"; exit 1; fi @@ -12,4 +12,4 @@ release: env GOOS=linux GOARCH=amd64 go build -v -o ./out/linux/ratio-spoof . env GOOS=windows GOARCH=amd64 go build -v -o ./out/windows/ratio-spoof.exe . - cd out/ ; zip ratio-spoof-$(rsversion)\(linux-mac-windows\).zip -r . \ No newline at end of file + cd out/ ; zip ratio-spoof-$(rsversion)\(linux-mac-windows\).zip -r .