~ knotless Search/
↑↓ move↵ open⇧↵ all results

geesawra.industries/hydraulophone

An unofficial YouTube Music app for iPhone, iPad, and Mac.

0
0
main
51 lines · 2.9 KB Raw History

Local player deciphering

Hydraulophone's optional cipher solver is local-only. The Core transport discovers and fetches a player JavaScript source over its approved YouTube HTTPS boundary, then passes that source to JavaScriptCorePlayerStreamCipher. The solver does not fetch scripts, send challenges to a service, or log and persist URLs, signatures, n values, cookies, or player source.

Approved provenance

The solver's signature and n transformation boundary is a narrow Swift adaptation of alexeichhorn/YouTubeKit at:

The pinned Meriyah, Astring, and yt-ejs JavaScript resources are vendored byte-for-byte and bundled for both SwiftPM and the iOS Core framework. The Swift wrapper adapts the pinned SignatureSolver.swift JSON request/response contract and environment shims; it does not guess globally visible function names or run the unmodified player source as a browser application. No YouTubeKit transport/authentication or remote extraction code is included. Complete MIT, Meriyah ISC, Astring MIT, and yt-dlp/ejs Unlicense notices and asset checksums accompany the vendored resources; NOTICE records attribution.

Runtime behavior

  • A JavaScriptCore context is created off the UI actor and retained only for the current player script.
  • The parser's prepared player output and at most 32 signature/n challenge pairs are cached in memory. Replacing the script releases the context/cache. Source, prepared output, and challenge sizes have explicit limits; the transport enforces its page/script byte limits while receiving.
  • Signature-only, n-only, and combined challenges are supported. A request with neither challenge is rejected.
  • Both incoming and rebuilt URLs must pass the approved HTTPS media-host policy and contain no user/password component. The service revalidates after the solver returns. Replacement query fields are emitted only once.
  • Cancellation is checked before script compilation, before each JavaScript call, and before URL reconstruction. A cancelled task propagates CancellationError. Synchronous JavaScript evaluation itself is not interruptible through JavaScriptCore's public Swift API; this limitation is not disguised as a hard execution timeout.

The player JavaScript is undocumented and changes without notice. This solver is intentionally limited to the local signature/n boundary; it does not provide PO tokens, HLS discovery, or a general JavaScript runtime. Deterministic synthetic IIFE/URL-builder tests exercise the real bundled parser/generator and prepared-player cache, not merely global toy functions. The default test suite never makes a live player request.