This is a script that I made to auto-remove all IPs associated with my ControlD account that are not from my home ISP. Sometimes I manage ControlD from a VPN, but don't mean to add the IP address to the authorized IPs list. This script goes through all ControlD IPs using the API and deletes any IPs that are not categorized as your whitelisted ISP name.
Install dependencies:
npm i
- Copy the
.env.example
file to.env
.
cp .env.example .env
- Fill out
.env
with your variables.
Check the "Getting API Details" section for help getting the CONTROLD_AUTHORIZATION
variable.
- Run
node index.js
- Visit the ControlD Dashboard while logged in.
- Open Dev Tools and head to the network tab with
CTRL
+SHIFT
+I
. - Reload page if needed.
- Click on a request, such as
proxies
. - Open the request and check the "Request Headers" section for your
authorization
header value.
This value should look similar to:
letter.integerletter.unix_timestamp.integer.very_long_hex_string