Change your IP address from a script

Portveil moves a machine's traffic to a VPN exit in another country with a single REST call. Your script asks, the machine switches, and the exit server confirms it. No clicking through a VPN app on a box you're not sitting at.

The call

API=https://api.portveil.com/v1/accounts/$ACCT

# where can this device go?
curl -H "Authorization: Bearer $TOKEN" https://api.portveil.com/v1/servers

# move it
curl -X POST "$API/devices/$DEV/commands" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type":"switch_server","server_id":"srv-eu-1"}'

# check the command finished
curl -H "Authorization: Bearer $TOKEN" "$API/commands/$COMMAND_ID"

A command goes from queued to delivered to acked once the device has switched. Then the device list shows it exiting in the new location, confirmed by that exit.

What you need

  1. A Portveil plan (from $7/month).
  2. The Portveil agent on the Linux machine whose IP you want to change.
  3. An API token with control scope from the dashboard.

Other ways to switch

Questions

How fast does the IP change?

Usually within 10 to 30 seconds: the device picks up the command, reconnects to the new exit, and the exit confirms it.

Which countries can I switch between?

The United States and Finland today. Every plan gets every location, and more are coming.

Can I rotate IPs for scraping?

You can move devices as often as you need, but scraping that breaks a site's terms of service isn't allowed. See the acceptable use policy.

Does it work on phones and laptops?

Phones and laptops connect through the WireGuard app and appear in the dashboard, but switching them by API needs the Portveil agent, which runs on Linux.