Service offering VPN with API integration
Service offering VPN with API integration
I've been testing Free ProtonVPN recently. Their API allows checking endpoint load and speeds. I created a script in my router to fetch all endpoints, select the fastest one, set the VPN there, and schedule it regularly. The Proton API link is https://api.protonmail.ch/vpn/logicals. Now I'm weighing the pros and cons by looking for other VPNs with comparable APIs so I don't rely solely on Proton. Anyone know if other providers offer similar functionality?
Instead of relying on a single VPN, a firewall appliance such as pfSense can track pings to various endpoints and automatically choose the best route with the lowest latency. This approach allows seamless integration of any number of VPNs without worrying about API updates or changes.
Based on my experience, pfSense isn't ideal for commercial VPNs because it frequently disrupts the firewall when servers lose packets. Every route change forces a restart, breaking ongoing sessions—it's quite frustrating. This is one of the main reasons I dislike it. While I mostly used AirVPN recently, which has been problematic, results can differ.
I believe your VPN should keep data flowing smoothly, not dropping packets. You can also define how much packet loss is acceptable before it switches connections. My WireGuard setup between sites has performed very well, though it's self-hosted—so I’m not dependent on any external providers beyond my ISP.
They're not entirely off the mark, though AirVPN servers often face packet loss problems. It's tough to measure accurately since losing ICMP packets isn't a top priority, and using ping doesn't really reflect true reliability. I believe another approach would be deep packet inspection to detect real traffic drops, but that poses its own challenges—especially when the connection is idle, it raises CPU usage on the device running the VPN client. I experimented with adjusting limits, but it didn’t solve the issue; instability often appears during active use and vanishes when idle, causing the gateway to be marked as down, then packet loss to drop, only to reset again. That’s why I’ve turned off gateway monitoring entirely and manually restart the VPN when it stops working. This isn’t just a VPN concern either—I have a 5G backup connection that also needs monitoring disabled, since pings can spike to 2000ms on poor links. I’ll note that my Wireguard link connected to an IONOS VPS in the US has been quite stable, especially after switching to FTTP. Another hassle with Wireguard is that restarting a VPN forces a full service restart, which can lead to one working well while another suffers from worse server issues. OpenVPN is simpler—just restart the problematic instance.