When developing an XML-RPC server it is necessary to 'expose' the machine to the Internet in order for Kapost to be able to interact with it.
The recommended way to solve this is to create a tunnel
instead of opening up the actual 'local' machine that is used for development.
This tunnel
will forward all requests to the local machine transparently and securely without the need of opening up any ports on the local machine or the local network.
There are a number of ways to create a tunnel, some more ubiquitos than others. In this document we'll focus on two tools
that run on all three major operating systems, namely Windows, OSX and Linux.
Head to https://ngrok.com/ and download the version appropriate for your operating system.
Make sure that the ngrok
utility is in your PATH (environment variable); if so then open up a Command Prompt / Terminal and
type:
$ ngrok 8080
The command above assumes that your local web server
is running on port 8080
. If that assumption is incorrect, then feel free to adjust the port number as necessary.
If the command executed then you should see a unique external URL
that have been assigned to you. You'll take this URL and use it when creating the Custom XML-RPC destination
in Kapost's App Center.
Use Ctrl+C / Cmd+C to stop ngrok
and close the tunnel when it is no longer needed.
Head to https://pagekite.net and download the version appropriate for your operating system.
Please note that you'll have to install Python 2.x
beforehand.
Make sure that Python
and the pagekite.py
utility are in your PATH (environment variable); if so then open up a Command Prompt / Terminal and type:
$ pagekite.py 8080 yourname.pagekite.me
The command above assumes that your local web server
is running on port 8080
. If that assumption is incorrect, then feel free to adjust the port number as necessary.
If the command executed then you should use yourname.pagekite.me
when creating the Custom XML-RPC destination
in Kapost's App Center.
Use Ctrl+C / Cmd+C to stop pagekite
and close the tunnel when it is no longer needed.