import re, requests, uuid
GATE = "gate.aeonproxy.com:7000"
# Country key only. Lookups print the company, so test the country field and then map
# the ASN to the brand. Sites write vatu as VUV, VT or vt, and Ray White sells in AUD.
NET = {"AS9249": "Vodafone", "AS132429": "Digicel", "AS45935": "WanTok"}
TAGGED = re.compile(r"(AUD|VUV|VT)\s*([\d,]+)")
SUFFIX = re.compile(r"([\d,]+)\s*vt\b")
def vanuatu_exit(tries=8):
for _ in range(tries):
sid = uuid.uuid4().hex[:8]
proxy = f"http://ap_a1b2c3-cc-vu-sid-{sid}-time-1200:PASS@{GATE}"
try:
geo = requests.get("https://ipinfo.io/json", proxies={"http": proxy, "https": proxy}, timeout=20).json()
except requests.RequestException:
continue # timed out: try another session
if geo.get("country") != "VU":
continue # outside Vanuatu: skip it
geo["network"] = NET.get(geo.get("org", "").split(" ")[0], geo.get("org"))
return proxy, geo # the same exit for 20 minutes
return None, None
def price(text):
m = TAGGED.search(text)
if m:
return ("AUD" if m.group(1) == "AUD" else "VUV"), int(m.group(2).replace(",", ""))
m = SUFFIX.search(text)
return ("VUV", int(m.group(1).replace(",", ""))) if m else None
proxy, geo = vanuatu_exit()
if proxy:
print(geo["ip"], geo.get("city"), geo["network"])
print(price("AUD 525,000"), price("VUV 125,000 per month"), price("5,000vt"))
A pool of this size can give nothing in a run, and the function then returns None. For a longer hold raise the seconds in the login, up to 21600; a login without -sid- gets a new exit per request.