nilaoda / WVCore.Server

Tiny Server. Example of WVCore Api.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WVCore.Server

Tiny Server. Example of WVCore Api.

Complie

  • Native AOT
dotnet publish -r win-x64 -c Release
  • Normal
del Directory.Build.props
dotnet publish -r win-x64 -c Release

Api

/wvapi

METHOD: POST

REQ:

{
    "PSSH":"PSSH",
    "Headers":{
        "User-Agent":"IOS"
    },
    "LicenseUrl":"https://auth"
}

RESP:

{
    "pssh":"PSSH",
    "keys":[
        "kid:key",
        "kid:key"
    ]
}

/getchallenge

METHOD: POST

REQ:

{
    "PSSH":"PSSH",
    "CertBase64":"CertBase64"
}

RESP:

{
    "challengeBase64":"challengeBase64"
}

/getkeys

METHOD: POST

REQ:

{
    "PSSH":"PSSH",
    "ChallengeBase64":"ChallengeBase64",
    "LicenseBase64":"LicenseBase64"
}

RESP:

{
    "pssh":"PSSH",
    "keys":[
        "kid:key",
        "kid:key"
    ]
}

JS Example

let body = {
    "PSSH": "AAAAp3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAIcSEFF0U4YtQlb9i61PWEIgBNcSEPCTfpp3yFXwptQ4ZMXZ82USEE1LDKJawVjwucGYPFF+4rUSEJAqBRprNlaurBkm/A9dkjISECZHD0KW1F0Eqbq7RC4WmAAaDXdpZGV2aW5lX3Rlc3QiFnNoYWthX2NlYzViZmY1ZGM0MGRkYzlI49yVmwY=",
    "Headers": {
        "User-Agent": "Test"
    },
    "LicenseUrl": "https://cwip-shaka-proxy.appspot.com/no_auth"
}
let json = await fetch("http://127.0.0.1:18888/wvapi", {
    body: JSON.stringify(body),
    headers: {
        "Content-Type": "application/json"
    },
    method: "POST"
}).then(resp => resp.json());
console.log(json.keys);

More

nilaoda/Blog#58

About

Tiny Server. Example of WVCore Api.


Languages

Language:C# 100.0%