Speedify SDK for Desktop/Embedded 15.5.0
Loading...
Searching...
No Matches
Embedding the Router UI

Extracting the UI Files

Extract and install the Speedify UI files provided by the SDK. The UI files are located in the SDK's routerui/ directory. speedifyui_files_gzip.tar.gz contains files suitable for a server that supports gzip compression. If your webserver does not support this, use speedifyui_files_uncompressed.tar.gz instead. The UI files are a gzipped tarball that should be extracted to a directory that is accessible by the reverse proxy HTTP daemon. The following sections will assume the UI files have been extracted to /www/speedify/

Secured Reverse Proxy Hosting

Hosting the Speedify UI behind a reverse proxy HTTP daemon, such as nginx, allows the Speedify API to be accessed securely over HTTPS and remain unexposed from direct access from the network. This is the recommended way to host the Speedify UI. The following is an example configuration for nginx:

location ~ ^/speedify/view/(.*) {
alias /www/speedify/$1;
gzip_static on;
}
location = /speedify/view/index.html {
alias /www/speedify/index.html;
gzip_static on;
}
location ~ ^/speedify/api/ws {
proxy_pass http://127.0.0.1:9330;
proxy_http_version 1.1;
proxy_set_header Host "localhost:";
proxy_set_header Origin "null";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

The Speedify UI can be embedded into your existing UI via an iframe. Use the wsPort and wsEndpoint query parameters to tell the Speedify UI where to connect to the Speedify API. The following is an example iframe that embeds the Speedify UI into your existing UI:

<iframe src="/speedify/view/index.html?wsPort=match&wsEndpoint=/speedify/api/ws" width="100%" height="80vh" style="border:none"></iframe>

Direct Access via Basic Web Server

If you do not have a reverse proxy, you can host the Speedify UI directly from a basic web server. You will need to disable Speedify API protection in order to allow the Speedify UI to access the Speedify API. This means that other devices on the network would have the ability to access the Speedify API to change settings, connect and disconnect Speedify, etc.

SpeedifySDK_SetAPIProtection(sdk,false,NULL,NULL);
ENABLE_NETWORK_SHARING SpeedifySDK_PrivacySettingsResult SpeedifySDK_SetAPIProtection(CSpeedifySDK sdk, bool enabled, SpeedifySDK_PrivacySettingsCallback cb SpeedifySDK_DEFAULTNULL, void *userData SpeedifySDK_DEFAULTNULL)

The Speedify UI can be embedded into your existing UI via an iframe. No query parameters are needed in this set up, as the defaults will work The following is an example iframe that embeds the Speedify UI into your existing UI:

<iframe src="/speedify/index.html" width="100%" height="80vh" style="border:none"></iframe>