GhostiFi — New PoC and Pseudocode

Reilly Chase
Nov 26, 2018 · 4 min read


If you are new here, this post is part 9 of a series I am writing covering the entire development process of GhostiFi, from concept, to sketch, to pseudocode, to actual code.

In my last post, I wrote about 2 roadblocks that I ran into while developing GhostiFi — my plan was to have instant DNS propagation when changing VPS IP addresses by using Cloudflare as a proxy, and to use Vultr snapshots as the basis for backing up/restoring/migrating OpenVPN servers.

During testing, both concepts, which were pretty much the foundation of the project, fell through. I found out that Cloudflare free plan can’t proxy VPN traffic (HTTP/HTTPS only), and the Vultr snapshots were slower and less reliable than I had expected.

New PoC

I had to come up with a new plan.

Instead of proxying through Cloudflare, I am just going to use Cloudflare DNS with the lowest TTL (120 seconds), and hope that will be short enough to not cause too much disruption to the user as they switch IP/locations with their GhostiFi VPS VPN.

In addition, I will leave the old server up for 5 minutes after the new server is built to allow time for that 2 minute DNS propagation window to complete.

Instead of using Vultr snapshots, I am going to create a private DigitalOcean Space for GhostiFi users’ OpenVPN configuration files. I will tar, label, and store them after initial OpenVPN server creation, then retrieve and untar those configurations for each server rebuild/migration. Making this step work is important, otherwise the user would have to reinstall all of the clients after every rebuild.

Pseudocode Changes

I had to go back to the drawing board and think about what the new pseudocode will look like in order to create the new PoC. Here is what the old pseudocode looks like.

Old Pseudocode

The highlighted areas will need to be changed:

New Pseudocode

Changes are in bold & italic:

Closing thoughts

I’m building GhostiFi completely transparently, sharing the process from concept, to sketch, pseudocode, and finally actual code. I hope this is helpful for anyone who is an aspiring programmer or entrepreneur to follow my journey.

If you have any feedback on GhostiFi or alternative solutions to these problems please let me know in the comments section!

I am also looking for feedback on the concept itself, as well as beta testers. Please sign up for the newsletter at if you are interested.

If you want to know when I release another post about building GhostiFi, you can follow me on Twitter: @_rchase_ or Medium: Reilly Chase



Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store