import requests
API_KEY = "xxx"
SUBSCRIPTION_ID = "su_69af3f2c91b24e8baf123456"
MY_IP = "1.2.3.4"
HEADERS = {"Content-Type": "application/json", "Authorization": f"ApiKey {API_KEY}"}
requests.put(f"https://api.ghostealth.com/dev/v1.0/subscriptions/{SUBSCRIPTION_ID}/whitelist", headers=HEADERS, json={"ipAddress": MY_IP})
res = requests.post(f"https://api.ghostealth.com/dev/v1.0/subscriptions/{SUBSCRIPTION_ID}/proxies", headers={"Content-Type": "application/json"}, json={"continents": ["con_WOYCndD", "con_NA25c26"], "countries": [], "protocols": ["HTTPS", "SOCKS5"]})
address = res.json()["data"][0]["address"]
proxies = {"http": f"http://{address}", "https": f"http://{address}"}
r = requests.get("https://httpbin.org/ip", proxies=proxies)
print(r.status_code, r.text)