I want to develop an external application to remotely manage these servers. So I'm so ecstatic when I found out about the JSON-RPC API. Someone even already made a client library written in my favorite language, JavaScript.
So I immediately writing some basic code to test following the mentioned sample.ts. But what's this? It doesn't work :(
Here's my simple code:
Code: Select all
const vpn = require('vpnrpc');
let api = vpn.VpnServerRpc("34.87.52.82", 443,"", process.env.SERVER_PASSWORD, false);
console.log(api);
But it simply returned undefined, which I can't use nor explains about why it didn't work.