Hey everyone!
Thought I'd talk about a new feature planned for the upcoming release of MistServer. We'll finally be adding API HTTP proxying. The reason why we're excited about this feature is because it improves several things when using MistServer.
The first and probably most requested thing is to have the interface available over SSL. While this is currently possible with a reverse proxy having more immediate support is always nicer. Of course MistServer would still need to be told where the certificate and key are and in order to bind with SSL MistServer does need to restart, however once set up MistServer would be fully over HTTPS instead of HTTP.
Second of would be within the interface itself, currently whenever you try to preview a stream the interface attempts to find the HTTP (or HTTPS) port, contact it for information & then start playback as a normal viewer would. When the API HTTP proxying is active, instead of the HTTP port MistServer can also serve HTTP contents over the API port. This is also the case even if HTTP is not set up. So as an admin you will always be able to preview your stream. Of course, this also works for HTTPS, though your browser might be less forgiving if the SSL authentication fails.
Now for the last improvement, since the admin using the interface would normallly be counted as a viewer it would somewhat mess with viewer sessions/statistics and would require anyone going over the interface to also be authenticated by any USER_NEW trigger that might be set up. Now that the API can forward HTTP and HTTPS requests we can ignore any viewers over this port for both statistics as well as sessions/authentication. So verifying stream status is much easier using the API/interface now compared to before.
The API HTTP proxying will be automatic when using the MistServer interface, however should you want to add this to your own you'll need to make use of the new API calls: admin_http_add, admin_http_delete, admin_http_extend, admin_http_list and admin endpoint //mistserver:apiport/http/TOKEN/path
These will be added to the documentation before release. You can create a TOKEN through the admin_http_add call, which will last for 5 minutes by default or needs to be extended by admin_http_extend (up to a maximum of 1 hour per extension). If active you can open up any normal stream url including the .html output using the APIport. For example .HTML output would be available under: http://yourmistserveraddress:4242/http/TOKEN/streamname.html