Files
RedLintu16andClaude Opus 5.5 b67b29b40b CrossSound desktop with the DRM stubbed out
A single-commit snapshot of better-remote (7a8c4cb plus the uncommitted
remote.js work), with every DRM-bearing piece replaced by a stub that keeps
the same interface:

- src/ui/drm.js: no DRM pipelines; needsDrm/isDrmUrl false,
  bestEncryptedTranscoding null, playDrmAudio rejects. The engine switcher
  and drmVjs* helpers stay as no-ops.
- src/electron/drm.ts: initCdm/setupLicenseCors no-ops; the drm:license and
  api:stream:drm-info IPC handlers reject with "DRM is not available".
- src/api/soundcloud.ts: resolveEncryptedStream keeps its signature, rejects.
- src/electron/main.ts: license host dropped from the header rewrite.
- src/ui/pb-lease.js: the expiry self-check uses a placeholder URL instead
  of a captured DRM manifest URL (same policy values, still passes).
- scripts/vmp-sign.js, forge.config.js vmpSign: Widevine signing skipped,
  so no castLabs EVS account is needed to run or package.
- README: says DRM is stubbed here.

Go+ tracks SoundCloud only serves encrypted are unplayable and skipped;
previews and everything else play as before. No history: the private
branches' DRM code is not reachable from this commit.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-14 10:06:08 -07:00

27 lines
811 B
JavaScript
Executable File

'use strict'
const http = require('http')
const https = require('https')
const { URL } = require('url')
/** Streams the given remote image URL through to the response (CORS-friendly). */
function proxyArtwork(url, res) {
if (!url) { res.writeHead(404); res.end(); return }
let parsed
try { parsed = new URL(url) } catch { res.writeHead(400); res.end(); return }
const lib = parsed.protocol === 'https:' ? https : http
lib.get(url, (upstream) => {
res.writeHead(upstream.statusCode ?? 200, {
'Content-Type': upstream.headers['content-type'] || 'image/jpeg',
'Cache-Control': 'public, max-age=60',
'Access-Control-Allow-Origin': '*',
})
upstream.pipe(res)
}).on('error', () => {
try { res.writeHead(502); res.end() } catch { /* already sent */ }
})
}
module.exports = { proxyArtwork }