Player APIs (BrightScript & Ja...
JavaScript APIs

openvpn

5min
the openvpn object can be used to connect players and servers through a vpn, without making them accessible to everyone openvpn idl interface openvpnconfig { attribute string archivefile; attribute string? obfuscatedsecret; }; interface openvpn { promise\<void> installandrun(openvpnconfig config); promise\<void> uninstall(); }; object creation var openvpn = require('@brightsign/openvpn'); var ovpn = new openvpn(); openvpn installandrun() promise\<void> installandrun(params openvpnparams) install the configuration and run openvpn uninstall() promise\<void> uninstall() stop and uninstall the configuration openvpnconfig archivefile string string path to the configuration zip obfuscatedsecret string string encrypted passphrase for protected certificates example this example sends logs to the sd card, but /storage/flash can also be used each method has a limitation if you use an sd card location, you cannot remove the card while the openvpn client is active or you will get an error log and the card can be corrupted, while /storage/flash may not be available depending on the player that you are using var openvpn = require('@brightsign/openvpn'); var ovpn = new openvpn(); var params = { archivefile '/storage/sd/openvpn zip' }; ovpn installandrun(params) then(function() { console log('success'); }) catch(function(err){ console log('err ' + json stringify(err)); }); ovpn uninstall() then(function() { console log('success'); }) catch(function(err){ console log('err ' + json stringify(err)); });