2.0.2 • Published 4 months ago
@warren-bank/widevine-license-proxy v2.0.2
Widevine License Proxy
How to: Run the server(s):
wvlpd <options>
options:
========
--help
--version
--tls
--req-insecure
--port <number>
--use <filepath>
--tls-cert <filepath>
--tls-key <filepath>
--tls-pass <filepath>
Functionality:
Supports a plugin architecture for server configuration.
Server Configuration:
The --use <filepath>
option can be repeated to configure multiple servers.
Each filepath points to a node (CommonJs) module.
The export signature of each module looks like:
module.exports = {
route: '/my-route', // unique path with optional params
getCertificate: async function(req) {
// input:
// const {method, headers, xhr, secure, protocol, path, params, query, body} = req
// output resolves to:
// String (in base64 encoding), Buffer, TypedArray, or ArrayBuffer
},
getLicense: async function(req) {
// input:
// const {method, headers, xhr, secure, protocol, path, params, query, body} = req
// output resolves to:
// String (in base64 encoding), Buffer, TypedArray, or ArrayBuffer
}
}
Where:
- the
req
object parameter is a deep clone of the Expressreq
objecthaving a subset of its properties
Examples:
Please refer to the recipes directory.
Legal:
- copyright: Warren Bank
- license: GPL-2.0