The Middleware Authorization is a client authorization on the third-party service, known as Middleware.
To configure Middleware Authorization open Settings
-> HTTP Auth
. From there, select the desired "Backend Type" and enter the appropriate "Backend Address" based on the selected type.
Backend Address:
http://example.com/stalker_portal
In the Ministra / Stalker settings turn on option Temporary URL
-> Flussonic support
Backend Address for cloud platform:
https://go.iptvportal.cloud
For local platform will be address of your server.
In the portal settings open Keys
menu and create a new key:
Name
: AstraAlgorithm
: ARESSTREAMMode
: SMKey Length
: 1472 bitUpdate Rate
: 1:00:00In portal channel settings:
Auth
: arescryptEncoded
: turn onKey
: AstraBackend Address:
http://example.com
If you need to implement custom authentication logic, you can create your own backend. Select HTTP Request
in Backend Type
and specify URL to your Middleware endpoint.
Astra sends an HTTP GET request to the Middleware endpoint, appending all query parameters from the original request, and session information in the HTTP headers:
X-Session-ID
- unique session numberX-Channel-ID
- unique channel identifierX-Real-IP
- client's IP addressX-Real-Path
- client's request pathX-Real-UA
- client's User-AgentX-Real-Host
- client's Host requestIn a response backend may send next HTTP headers:
X-Session-Name
- client login or any other name for sessionFor example:
https://auth.example.com/check
https://live.example.com/play/a001/index.m3u8?token=123
https://auth.example.com/check?token=123
X-Real-Path: /play/a001/index.m3u8
and other headers depending of clients requestIf backend is not available, then Astra allows access.
If you get access to the channel without authorization, probably your HTTP backend is unavailable. You can check it with curl
command. Open console on your server with Astra. And try to send request to the HTTP backend manually:
curl -v "https://auth.example.com/check"
Of course address should be same as in your settings.
If you see something like Connection refused
or connection is stuck without any response, then issue with access to the backend.