本站支持搜索的镜像仓库:Docker Hub、gcr.io、ghcr.io、quay.io、k8s.gcr.io、registry.gcr.io、elastic.co、mcr.microsoft.com

Welcome to Content Proxy! This repo contains the source code for building the verimatrixinc/content-proxy image.
Content Proxy is an ExpressJs application meant to act as a Proxy for accessing Content authorization JSON Web tokens. The Content Proxy contains a default version of Entitlement Check middleware that always returns true such that all devices are entitled to content. It also contains a Token Generator middleware that generates a JSON Web Token that grants access to Content. The default version of Entitlement Check is meant to provide a sample implementation that can be overriden.
The repo comes with a default Entitlement Check that can be overriden with any custom entitlement check. There are no deployment scripts or infrastructure, these details are left to the user to deploy into their own container orchestration service. There is no secrets management and it is up to the user to secure their own private keys and secrets. This README file contains an example of (how to perform secrets management using AWS secrets manager)
docker run \ --env OPERATOR_KEY_ID="[key-id]" \ --env OPERATOR_ISSUER="[issuer]" \ --env OPERATOR_AUDIENCE="[audience]" \ verimatrixinc/content-proxy
docker run \ --env OPERATOR_KEY_ID="[key-id]" \ --env OPERATOR_ISSUER="[issuer]" \ --env OPERATOR_AUDIENCE="[audience]" \ --env SERVER_PORT="80" \ --env DEFAULT_ENTITLEMENT_ENABLED="true" \ verimatrixinc/content-proxy
OPERATOR_KEY_ID - Identifies the key that will secure the tokenOPERATOR_ISSUER - Identifies the issuer of the tokenOPERATOR_AUDIENCE - Identifies the recipients that the token is intended forSERVER_PORT - Port where the authorization server will run (default: 80)DEFAULT_ENTITLEMENT_ENABLED - Enable or disable default Entitlement Check, when enabled it will always return true, otherwise falsePlease refer to Verimatrix PROD-7310 JSON Web Token Specification for more information on how to configure key-id, issuer, and audience.
One implementation that can be used to secure private keys and secrets is to use AWS Secrets Manager. This however can be done with any secrets management provider you may choose.
Using a AWS account the secrets can be stored in the Secrets Manager Console. The data can then be read by the Content Proxy using an async function which calls AWS Secrets Manager and returns a secret value:
import * as AWS from "aws-sdk"; export async function getAwsSecret(secretId: string): Promise<string> { const secretsManager = new AWS.SecretsManager(); const value = (await secretsManager.getSecretValue({ SecretId: secretId }).promise()).SecretString; if (!value) { throw new Error("Unable to retrieve value from Secrets Manager"); } return value; }
The secret values retrieved are a JSON object similar to this:
{ "privateKey": "some private key", "secret": "some secret" }
With the JSON Object, the user only needs to parse the response and use it to call the Token Generator middleware that will handle the actual generation of the Token:
fetchSecrets(config.get<string>('secretId')).then(secret => const secretObj = JSON.parse(secret); app.use(tokenGenerator({ privateKey: secretObj.privateKey })) // server start logic );
The Default Entitlement Check is a middleware designed to provide a basic skeleton for any custom Entitlement Checks. The Default Enititlement check will will always succeed and grant access to all devices, for all content.
The middleware is stored in the /middleware folder inside /default, and it's implemented in index.ts
if defaultEntitlement.enable is set to true:
if (config.get < boolean > "defaultEntitlement.enabled") app.use(defaultEntitlement());
Each request that is sent to the Content Proxy running will always succeed if the query parameters include a vdis and subject (deviceId and contentId), regardless of the values. Users are encouraged to create their own Entitlement Checks under /middleware and to plug them into the server the same way Default Entitlement Check is implemented
Please review the load testing scenario and recommendations doc.
nvm use # use proper node version yarn install # install dependencies yarn start # start the server using nodemon
Any updates to the files within the ./src directory will trigger a restart of the server.
Configuration is set using the "config" npm package. This provides a nice interface for setting default variables, with the ability to override per environment or with environment variables.
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录方式配置轩辕镜像加速服务,包含7个详细步骤
在 Linux 系统上配置轩辕镜像源,支持主流发行版
在 Docker Desktop 中配置轩辕镜像加速,适用于桌面系统
在 Docker Compose 中使用轩辕镜像加速,支持容器编排
在 k8s 中配置 containerd 使用轩辕镜像加速
在宝塔面板中配置轩辕镜像加速,提升服务器管理效率
在 Synology 群晖NAS系统中配置轩辕镜像加速
在飞牛fnOS系统中配置轩辕镜像加速
在极空间NAS中配置轩辕镜像加速
在爱快ikuai系统中配置轩辕镜像加速
在绿联NAS系统中配置轩辕镜像加速
在威联通NAS系统中配置轩辕镜像加速
在 Podman 中配置轩辕镜像加速,支持多系统
配置轩辕镜像加速9大主流镜像仓库,包含详细配置步骤
无需登录即可使用轩辕镜像加速服务,更加便捷高效
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429