Commit graph

133 commits

Author SHA1 Message Date
8126cc0da5 audit-fix sprint: all 13 findings (CRIT/HIGH/MED/LOW)
CRIT-1: ExtractionError::Deobfuscation is now switchable.
        Deobfuscator gains has_sig()/has_nsig() — deobfuscate_sig/_nsig
        short-circuit with a recognisable error class so cipher streams
        on the wrong client fall through to the next client in the chain
        instead of killing the whole call.

CRIT-2: Soft-failed DeobfData now caches with a 1-hour retry instead of
        living for 24h. Re-extraction kicks in automatically once YT
        rotates back to a player.js shape we recognise — no more
        wall-clock-day-of-poisoned-cache.

HIGH-1: Reporter now emits a Level::WRN `extract_deobf_soft_fail` report
        on partial extraction. straw / torttube get an artefact when
        sig/nsig regex starts missing.

HIGH-2: player_client_order branches on opts.auth. With botguard
        + authed-cookie users, Desktop is now position 2 (where their
        cookie maps to an OAuth session) instead of position 4.

HIGH-3: Android dropped from the default order. needs_po_token doesn't
        flag Android, so requests were firing unsigned and tripping
        YT's bot-check rejection — which is also not switchable.
        Re-add when a real po_token strategy lands.

MED-1: Comment in needs_deobf softened — the iOS/Android-no-deobf
        property is a current YT behaviour, not a permanent protocol.

MED-2: Cargo.toml workspace pin bumped 0.11.4 → 0.11.5 so it matches
        the package version (avoids future 0.12.x bump surprises).

MED-3: Smoke test fixture uses an isolated per-process scratch dir
        instead of the repo root, avoiding cache-race with
        tests/youtube.rs (which uses CARGO_MANIFEST_DIR and could
        wipe OAuth tokens).

LOW-1: Misleading "dead-code fallback" comment in extract_fns replaced
        with the actual behaviour description.

LOW-2: get_deobf_data uses read-then-write — concurrent player calls
        on warm cache no longer serialise on the write lock.

LOW-3: Smoke test catches IpBan via exact UnavailabilityReason match
        instead of substring "Sign in/IpBan/bot" — a real regression
        won't silently pass anymore.

LOW-4: TV smoke test now asserts !audio_streams.is_empty() too,
        matching iOS / default-order tests.

LOW-5: needs_deobf comment notes YT's historical n= experiments on
        Android — sets expectation for future review passes.
2026-05-24 12:20:14 -07:00
8d7f6b4455 release: 0.11.5 — semver-compatible version bump for fork
Use 0.11.5 instead of 0.11.4-sulkta.1 so the in-workspace
rustypipe-downloader / rustypipe-cli crates (which require
`rustypipe = ^0.11.4`) keep resolving. The original upstream rev
on codeberg is at 0.11.4; we tag this internal release as 0.11.5
to keep cargo happy without needing to bump dependents.
2026-05-24 11:58:30 -07:00
84bb666bb2 release: 0.11.4-sulkta.1 — soft-fail sig + iOS-first default order
Smoke-tested against current YT player c2f7551f (May 2026):

  test ios_player_returns_streams ........... ok
  test default_client_order_returns_streams . ok  (audio Range-GET 206 Partial Content, 1024 bytes)
  test tv_player_returns_streams ............ ok (or env-skipped on IP-banned egress)

Fork changes since upstream v0.11.4:
- client::ClientType::needs_deobf: skip player.js deobf for Android too
- client::player::player_client_order: prefer iOS first (no botguard),
  iOS/Android/Tv/Desktop (with botguard)
- deobfuscate::DeobfData::extract_fns: soft-fail sig_fn/nsig_fn extraction
  so Tv/Desktop callers keep working when YT rotates player.js to a shape
  our regex doesn't recognise — only the load-bearing sig_timestamp is
  required for the request payload
- tests/sulkta_smoke.rs: end-to-end sanity covering iOS, Tv, default-order
  and a Range-GET probe to confirm YT actually serves the audio bytes
2026-05-24 11:57:46 -07:00
ThetaDev
1f4c9c85b9
chore(release): release rustypipe v0.11.4 2025-04-23 21:30:33 +02:00
ThetaDev
703f350b6b
chore(release): release rustypipe v0.11.3 2025-04-03 13:39:28 +02:00
ThetaDev
af415ddf8f chore(deps): update rust crate rand to 0.9.0 2025-04-03 11:08:18 +00:00
ThetaDev
23c8775326
chore(release): release rustypipe v0.11.2 2025-03-24 01:50:53 +01:00
ThetaDev
64ed3b14e3
chore(release): release rustypipe v0.11.1 2025-03-16 18:13:55 +01:00
ThetaDev
9ed1306f3a
chore(deps): update rust crate rstest to 0.25.0 2025-03-04 22:48:10 +01:00
ThetaDev
1adcb12932
chore(release): release rustypipe v0.11.0 2025-02-26 19:41:36 +01:00
ThetaDev
26e0c2cb2b
chore(release): release rustypipe-downloader v0.3.0 2025-02-09 02:53:59 +01:00
ThetaDev
fb1b732d56
chore(release): release rustypipe v0.10.0 2025-02-09 02:32:44 +01:00
ThetaDev
65cb4244c6
feat!: add userdata feature for all personal data queries (playback history, subscriptions) 2025-02-07 13:21:12 +01:00
ThetaDev
9890538c0e
reorganize time-tz dependency 2025-02-07 04:13:45 +01:00
ThetaDev
5acbf0e456
fix: use localzone crate to get local tz 2025-02-07 04:13:44 +01:00
ThetaDev
a5a7be5b4e
fix: correct timezone offset for parsed dates, add timezone_local option 2025-02-07 04:13:44 +01:00
ThetaDev
3a2370b97c
feat: add timezone query option 2025-02-07 04:13:43 +01:00
ThetaDev
b90a252a5e
feat: add support for rustypipe-botguard to get PO tokens 2025-02-05 15:56:14 +01:00
ThetaBot
2c8ac410aa chore(deps): update rust crate rquickjs to 0.9.0 (#33) 2025-01-30 00:02:16 +00:00
ThetaDev
5fc6d9dda4
chore(release): release rustypipe v0.9.0 2025-01-16 13:42:43 +01:00
ThetaDev
0432477451
docs: update README 2025-01-16 03:45:12 +01:00
ThetaBot
6a604252b1 chore(deps): update rust crate dirs to v6 (#24) 2025-01-13 03:00:02 +00:00
ThetaDev
75c3746890
fix: switch to rquickjs crate for deobfuscator 2025-01-13 03:30:07 +01:00
ThetaDev
14e399594f
feat: add functions to fetch a user's history and subscriptions 2025-01-05 05:50:58 +01:00
ThetaBot
ab19034ab1 chore(deps): update rust crate rstest to 0.24.0 (#20) 2025-01-05 04:50:35 +00:00
ThetaDev
ec7a195c98
fix: require new time crate version which added Month::length 2024-12-27 22:10:19 +01:00
ThetaDev
8eaa2331fd
chore(release): release rustypipe v0.8.0 2024-12-20 14:32:37 +01:00
ThetaDev
51b6ab3780
chore(release): release rustypipe v0.7.2 2024-12-13 03:56:58 +01:00
ThetaDev
5c39bf4842
fix: replace futures dependency with futures-util 2024-12-01 22:24:00 +01:00
ThetaDev
e6ec5ed255
chore(release): release rustypipe v0.7.1 2024-11-25 16:47:29 +01:00
ThetaDev
8e0e66ffec
chore(release): release rustypipe v0.7.0 2024-11-10 14:51:39 +01:00
ThetaBot
e1e1687605 chore(deps): update rust crate thiserror to v2 (#16) 2024-11-10 00:05:46 +00:00
ThetaDev
986a15418d
chore(release): release rustypipe v0.6.0 2024-10-28 01:35:35 +01:00
ThetaBot
0662b5ccfc chore(deps): update rust crate quick-xml to 0.37.0 (#15) 2024-10-28 00:07:35 +00:00
ThetaBot
94194e019c chore(deps): update rust crate fancy-regex to 0.14.0 (#14) 2024-10-27 00:37:47 +00:00
ThetaDev
1ee4fa5d7f
chore(release): release rustypipe v0.5.0 2024-10-13 17:01:58 +02:00
ThetaBot
96776e98d7 chore(deps): update rust crate rstest to 0.23.0 (#12) 2024-10-12 03:58:22 +00:00
ThetaDev
90f79cc887
chore(release): release rustypipe-downloader v0.2.1 2024-09-10 03:36:29 +02:00
ThetaDev
2d3914bc4b
chore(release): release rustypipe v0.4.0 2024-09-10 03:34:51 +02:00
ThetaBot
a445e51b54 chore(deps): update rust crate tokio to 1.20.4 [security] (#10)
Reviewed-on: https://codeberg.org/ThetaDev/rustypipe/pulls/10
Co-authored-by: ThetaBot <thetabot@noreply.codeberg.org>
Co-committed-by: ThetaBot <thetabot@noreply.codeberg.org>
2024-08-18 13:41:33 +00:00
ThetaDev
cad3bcd9e9
chore(release): release rustypipe-downloader v0.2.0 2024-08-18 03:25:57 +02:00
ThetaDev
67a231d6d1
fix: show docs.rs feature flags 2024-08-18 03:25:02 +02:00
ThetaDev
d933f1b2fd
chore(release): release rustypipe v0.3.0 2024-08-18 03:04:09 +02:00
ThetaDev
70c6f8c3b9
chore: adjust dependency versions 2024-08-18 03:03:15 +02:00
ThetaDev
17933315d9
chore: change repo URL to Codeberg 2024-08-18 03:03:15 +02:00
ThetaDev
a3a1d9abf3
test: add downloader test 2024-08-17 23:11:44 +02:00
Forgejo Actions
abb783219a chore(deps): update rust crate rstest to 0.22.0 (#9) 2024-08-14 21:22:28 +02:00
ThetaDev
1e1315a837
feat: downloader: add audio tagging 2024-07-31 03:27:27 +02:00
Forgejo Actions
b6bc05c1f3 chore(deps): update rust crate quick-xml to 0.36.0 (#8)
Reviewed-on: https://code.thetadev.de/ThetaDev/rustypipe/pulls/8
Co-authored-by: Forgejo Actions <forgejo.actions@example.com>
Co-committed-by: Forgejo Actions <forgejo.actions@example.com>
2024-07-29 18:20:51 +02:00
ThetaDev
8152ce6b08
fix: improve deobfuscator (support multiple nsig name matches, error if mapping all streams fails)
Since YouTube keeps changing the nsig function signature and a generic regex may match at multiple places, I changed the extraction logic to search for multiple matches if necessary and test the extracted deobfuscation functions.

I also found out that if the deobfuscation fails for all streams, fetching the player still returns a successful result with no streams, suggesting that the video is not available. So I changed the mapper to throw an ExtractionError if no streams are mapped successfully.
2024-07-29 14:45:52 +02:00