Commit Graph

64 Commits

Author SHA1 Message Date
Kavin e8169726b4 Run clippy fix. 2024-03-11 09:10:10 +00:00
Kavin e0bb6a3a78 Only attempt ump decoding when response is successful. 2024-01-03 18:25:30 +00:00
Kavin cd8cf245c0 Set content-length and range query parameter properly. 2023-12-15 17:57:46 +00:00
Kavin 7c72df8f0d Add error logging for UMP Transforming Errors in the transformed stream 2023-12-14 22:48:39 +00:00
Kavin 437ee17508 Poll should be pending when there's not enough data to read. 2023-12-14 22:19:13 +00:00
Kavin e291ed4e19 Refactor utils and UMP transforming code to new files. 2023-12-14 13:37:52 +00:00
Kavin e90eebcbd7 Don't include /range/ in hash
See https://github.com/TeamPiped/Piped/issues/3211
2023-12-14 05:03:55 +00:00
Kavin 19dca8bdd0 Escape URL when rewriting DASH responses. 2023-12-14 05:03:08 +00:00
Kavin 7586ae314b Refactor UmpTransformStream to use io::Error instead of ReqwestError
- Replaced all occurrences of `ReqwestError` with `io::Error` in the code.
- Updated the type signature and implementation of `UmpTransformStream` to use `io::Error`.
- Handled errors when calling `read_variable_integer` by returning an error result.
2023-12-11 22:51:16 +00:00
Kavin c3b78def59 Be compliant with rfc7233 for sending a 206 response. 2023-12-08 10:47:52 +00:00
Kavin a9bc07e98d Send 206 response in UMP response content. 2023-12-06 06:39:18 +00:00
Kavin 2295ad3d94 Add range header handling for ump streams.
See https://github.com/TeamPiped/Piped/issues/3196
2023-11-30 02:10:50 +00:00
Kavin 75f7c4e8cd Return the right variable when rewriting manifests
This should now correctly return the rewritten manifest.
2023-11-28 18:36:36 +00:00
Kavin a2e77d2668 Fix for another edge case. 2023-11-28 03:47:04 +00:00
Kavin 3e8098d105 Fix issues with skipping certain stream segments. 2023-11-28 02:54:02 +00:00
Kavin 2164f907ef Add support for handling ump responses. 2023-11-27 23:54:55 +00:00
Kavin 496f58f81a fix: Add support for generating qhash in rewritten manifests
Closes https://github.com/TeamPiped/Piped/issues/3162
2023-11-21 12:45:53 +00:00
Kavin d72fb3c445 Include path in hash 2023-11-20 08:32:37 +00:00
Kavin 01697ebb86 Filter qhash query parameter. 2023-11-20 08:09:38 +00:00
Kavin dfe87e0292 Fix clippy issue. 2023-11-20 08:05:47 +00:00
Kavin 2aa3053d34 Remove use of channel. 2023-11-20 05:21:46 +00:00
Kavin 2abd43bfb2 Make the hashing run on spawn_blocking. 2023-11-20 05:13:31 +00:00
Kavin faafbcb737 Implement blake3 cryptographic hash verification for query string. 2023-11-20 05:13:31 +00:00
Jake Howard 031df8da4d Let spawn_blocking handle returning its own value
This means one fewer thing to await on, and spin up inside a request. It _might_ be faster, who knows, but it can't hurt.
2023-11-18 16:32:28 +00:00
Bnyro 151b10775f refactor: properly check boolean env vars
Co-authored-by: Jeidnx <jeidnx@domainhier.de>
2023-10-20 16:14:35 +02:00
Kavin bd9232d6c2 Small change and cargo fmt. 2023-10-10 02:08:05 +01:00
Kavin 57bac7177c Fix compile issues. 2023-09-29 22:29:26 +01:00
Kavin 59eb2a1db8 Small code improvements. 2023-09-29 13:10:48 +01:00
Kavin 0edb727a03 Small code improvement, 2023-09-29 13:00:59 +01:00
Kavin 3d99bdd454 Fix image transcoding check. 2023-09-29 13:00:33 +01:00
chaos 70a167d34a re-add compatibility with only UDS set 2023-09-27 21:41:09 +01:00
chaos 7789af5658 Reformat code 2023-09-27 21:40:54 +01:00
chaos f3754b46cf Allow more minimal cargo features, tidy code, allow setting unix domain socket filename 2023-09-27 21:40:47 +01:00
Kavin 0d4eda637d Perform webp and avif conversion on blocking tasks. 2023-09-09 05:13:30 +01:00
Kavin ef6250ba72 Fix compile issues. 2023-08-21 23:03:00 +01:00
Kavin 63953d283e Add support for using proxies. 2023-08-21 22:56:18 +01:00
Kavin 5212b4213c Turn webp rewriting into a feature flag. 2023-08-05 16:26:19 +01:00
Bnyro b97632a387 cleanup query handling and domain validation 2023-08-04 11:32:29 +02:00
Kavin 1dd4afdb16 Add header value as bytes directly. 2023-07-19 03:12:02 +01:00
Kavin 401d1ba1fe Add ajay.app to allowed domains
This is required for adding dearrow support currently.
2023-07-19 00:35:51 +01:00
Kavin 5c9311f654 Put avif behind a feature flag. 2023-07-13 11:46:17 +01:00
Kavin 477c412875 Reduce speed in avif encoding. 2023-07-13 11:17:10 +01:00
Kavin 85a4beeb54 Fix panicking issue. 2023-07-13 11:00:57 +01:00
Kavin 6b46efb100 Add avif re-encoding support. 2023-07-12 16:44:11 +01:00
Kavin 043cc36dfd Use libwebp-sys crate directly. 2023-07-11 02:09:14 +01:00
Kavin 19bd7701ec Bump UA as firefox froze them. 2023-06-09 19:39:06 +01:00
Kavin 6624254534 Spoof Android client properly. 2023-06-02 11:03:49 +01:00
Kavin ab1f54bf51 Use the mimalloc allocator. 2023-05-23 04:03:52 +01:00
Kavin 6aeefc03e2 Optimize code to remove copy of query string. 2023-04-25 09:14:48 +01:00
Kavin 6dc1c6a896 Update FF UA. 2023-03-25 16:21:38 +00:00