proxy code generator
pick a product and a client. the page prints the code, with the host, the port and the username already built.
the country and the session live inside the proxy username, not in a separate setting. change that one string and the next request exits somewhere else, with no call to us and no wait.
every snippet here is built on the server by the same module that builds real credentials, so what you paste is what the network expects. change the product and the host, the ports and the targeting change with it.
configure
the connection
usernameu123456
passwordYOUR_PASSWORD
hostgeo.myxproxy.com
port8080
http port8080
socks5 port1080
targeting in the usernamecountry, state, city
session modesrotating, sticky
u123456 and YOUR_PASSWORD are placeholders. the real pair is on the plan in your dashboard.
code
python / requestsexit-ip.py
import requests
# the country and the session ride in the username, not in a separate option
PROXY = "http://u123456:YOUR_PASSWORD@geo.myxproxy.com:8080"
# the dict key is the scheme of the TARGET url, so both keys point at the same proxy
PROXIES = {"http": PROXY, "https": PROXY}
resp = requests.get("http://api.ipify.org", proxies=PROXIES, timeout=30)
print(resp.text)
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- the username and the password are percent encoded inside the url, so a password containing @ : / ? or # cannot cut the userinfo short.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
python / httpxexit-ip.py
import httpx
PROXY = "http://u123456:YOUR_PASSWORD@geo.myxproxy.com:8080"
# proxy= is singular. the plural proxies= argument was removed in httpx 0.28.
with httpx.Client(proxy=PROXY, timeout=30.0) as client:
resp = client.get("http://api.ipify.org")
print(resp.text)
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- the username and the password are percent encoded inside the url, so a password containing @ : / ? or # cannot cut the userinfo short.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
python / aiohttpexit-ip.py
import asyncio
import aiohttp
PROXY = "http://geo.myxproxy.com:8080"
# aiohttp takes credentials as an object, so nothing has to survive url encoding
AUTH = aiohttp.BasicAuth("u123456", "YOUR_PASSWORD")
async def main():
async with aiohttp.ClientSession() as session:
async with session.get("http://api.ipify.org", proxy=PROXY, proxy_auth=AUTH) as resp:
print(await resp.text())
asyncio.run(main())
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- credentials are passed as their own values rather than inside a url, so no percent encoding applies to them.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
python / playwrightexit-ip.py
from playwright.sync_api import sync_playwright
# credentials go in their own fields. put them in the server url and chromium ignores them.
PROXY = {
"server": "http://geo.myxproxy.com:8080",
"username": "u123456",
"password": "YOUR_PASSWORD",
}
with sync_playwright() as p:
browser = p.chromium.launch(proxy=PROXY)
page = browser.new_page()
page.goto("http://api.ipify.org")
print(page.inner_text("body"))
browser.close()
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- credentials are passed as their own values rather than inside a url, so no percent encoding applies to them.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
python / scrapyexit-ip.py
import base64
import scrapy
PROXY = "http://geo.myxproxy.com:8080"
USER = "u123456"
PASSWORD = "YOUR_PASSWORD"
# scrapy 2.6 stopped honouring credentials inside meta["proxy"], so they go in the header.
# the meta key is "proxy"; http_proxy is the environment variable, which is a different thing.
CREDS = base64.b64encode((USER + ":" + PASSWORD).encode()).decode()
class ExitIpSpider(scrapy.Spider):
name = "exit_ip"
def start_requests(self):
yield scrapy.Request(
"http://api.ipify.org",
meta={"proxy": PROXY},
headers={"Proxy-Authorization": "Basic " + CREDS},
)
def parse(self, response):
yield {"exit_ip": response.text}
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- credentials are passed as their own values rather than inside a url, so no percent encoding applies to them.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
- run it with: scrapy runspider spider.py
javascript / fetch (undici)exit-ip.mjs
// npm i undici
// node bundles undici internally to power the global fetch, but does not publish it as a
// module: on node 24 both require("undici") and node:undici fail until the package is
// installed. plain fetch has no proxy option, so ProxyAgent has to come from there.
import { ProxyAgent } from "undici";
const agent = new ProxyAgent("http://u123456:YOUR_PASSWORD@geo.myxproxy.com:8080");
const res = await fetch("http://api.ipify.org", { dispatcher: agent });
console.log(await res.text());
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- the username and the password are percent encoded inside the url, so a password containing @ : / ? or # cannot cut the userinfo short.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
- top level await, so save it as .mjs or set "type": "module" in package.json.
javascript / axiosexit-ip.mjs
// npm i axios
import axios from "axios";
// the proxy object keeps credentials out of a url, so no percent encoding is involved
const res = await axios.get("http://api.ipify.org", {
proxy: {
protocol: "http",
host: "geo.myxproxy.com",
port: 8080,
auth: { username: "u123456", password: "YOUR_PASSWORD" },
},
});
console.log(res.data);
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- credentials are passed as their own values rather than inside a url, so no percent encoding applies to them.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
- top level await, so save it as .mjs or set "type": "module" in package.json.
- the proxy option is node only. in a browser build axios ignores it.
javascript / puppeteerexit-ip.mjs
// npm i puppeteer
import puppeteer from "puppeteer";
// the flag carries the endpoint only. credentials in it are ignored by chromium.
const browser = await puppeteer.launch({ args: ["--proxy-server=http://geo.myxproxy.com:8080"] });
const page = await browser.newPage();
await page.authenticate({ username: "u123456", password: "YOUR_PASSWORD" });
await page.goto("http://api.ipify.org", { waitUntil: "domcontentloaded" });
console.log(await page.evaluate(() => document.body.innerText));
await browser.close();
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- credentials are passed as their own values rather than inside a url, so no percent encoding applies to them.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
- top level await, so save it as .mjs or set "type": "module" in package.json.
javascript / playwrightexit-ip.mjs
// npm i playwright
import { chromium } from "playwright";
// server carries the endpoint. credentials are separate fields; inside the url they fail silently.
const browser = await chromium.launch({
proxy: {
server: "http://geo.myxproxy.com:8080",
username: "u123456",
password: "YOUR_PASSWORD",
},
});
const page = await browser.newPage();
await page.goto("http://api.ipify.org");
console.log(await page.innerText("body"));
await browser.close();
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- credentials are passed as their own values rather than inside a url, so no percent encoding applies to them.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
- top level await, so save it as .mjs or set "type": "module" in package.json.
go / net/httpexit-ip.go
package main
import (
"fmt"
"io"
"net/http"
"net/url"
"time"
)
func main() {
// credentials live in the url userinfo, percent encoded
proxyURL, err := url.Parse("http://u123456:YOUR_PASSWORD@geo.myxproxy.com:8080")
if err != nil {
panic(err)
}
client := &http.Client{
Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)},
Timeout: 30 * time.Second,
}
resp, err := client.Get("http://api.ipify.org")
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- the username and the password are percent encoded inside the url, so a password containing @ : / ? or # cannot cut the userinfo short.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
go / custom transport (tls)exit-ip.go
package main
import (
"crypto/tls"
"fmt"
"io"
"net/http"
"net/url"
"time"
)
func main() {
proxyURL, err := url.Parse("http://u123456:YOUR_PASSWORD@geo.myxproxy.com:8080")
if err != nil {
panic(err)
}
transport := &http.Transport{
Proxy: http.ProxyURL(proxyURL),
TLSClientConfig: &tls.Config{
// certificate verification stays on. the proxy relays the tls bytes and never
// terminates them, so the chain the target presents is the one you verify. turning
// this off would hide a real interception rather than fix a proxy problem.
MinVersion: tls.VersionTLS12,
},
ForceAttemptHTTP2: true,
MaxIdleConns: 100,
MaxIdleConnsPerHost: 100,
IdleConnTimeout: 90 * time.Second,
}
client := &http.Client{Transport: transport, Timeout: 30 * time.Second}
resp, err := client.Get("http://api.ipify.org")
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- the username and the password are percent encoded inside the url, so a password containing @ : / ? or # cannot cut the userinfo short.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
rust / reqwest (blocking)exit-ip.rs
// in Cargo.toml: reqwest = { version = "0.12", features = ["blocking"] }
use std::time::Duration;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// basic_auth keeps the password out of the url, so no percent encoding is involved
let proxy = reqwest::Proxy::all("http://geo.myxproxy.com:8080")?
.basic_auth("u123456", "YOUR_PASSWORD");
let client = reqwest::blocking::Client::builder()
.proxy(proxy)
.timeout(Duration::from_secs(30))
.build()?;
let body = client.get("http://api.ipify.org").send()?.text()?;
println!("{}", body);
Ok(())
}
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- credentials are passed as their own values rather than inside a url, so no percent encoding applies to them.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
rust / reqwest (async)exit-ip.rs
// in Cargo.toml: reqwest = "0.12"
// tokio = { version = "1", features = ["full"] }
use std::time::Duration;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let proxy = reqwest::Proxy::all("http://geo.myxproxy.com:8080")?
.basic_auth("u123456", "YOUR_PASSWORD");
let client = reqwest::Client::builder()
.proxy(proxy)
.timeout(Duration::from_secs(30))
.build()?;
let body = client.get("http://api.ipify.org").send().await?.text().await?;
println!("{}", body);
Ok(())
}
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- credentials are passed as their own values rather than inside a url, so no percent encoding applies to them.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
shell / curlexit-ip.sh
curl -sS -x 'http://u123456:YOUR_PASSWORD@geo.myxproxy.com:8080' 'http://api.ipify.org'
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- the username and the password are percent encoded inside the url, so a password containing @ : / ? or # cannot cut the userinfo short.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
shell / httpieexit-ip.sh
# the value is scheme:proxy-url, where the first scheme is the one being proxied
http --proxy='http:http://u123456:YOUR_PASSWORD@geo.myxproxy.com:8080' \
--proxy='https:http://u123456:YOUR_PASSWORD@geo.myxproxy.com:8080' \
'http://api.ipify.org'
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- the username and the password are percent encoded inside the url, so a password containing @ : / ? or # cannot cut the userinfo short.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
shell / wgetexit-ip.sh
# wget ignores userinfo in a proxy url, so the endpoint and the credentials are separate:
# the endpoint comes from the environment, the credentials from flags.
http_proxy='http://geo.myxproxy.com:8080' https_proxy='http://geo.myxproxy.com:8080' \
wget -e use_proxy=yes \
--proxy-user='u123456' \
--proxy-password='YOUR_PASSWORD' \
-qO - 'http://api.ipify.org'
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- credentials are passed as their own values rather than inside a url, so no percent encoding applies to them.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
- a password on the command line is visible in ps output. put it in ~/.wgetrc as proxy_password if that matters.
text / proxy uriexit-ip.txt
http://u123456:YOUR_PASSWORD@geo.myxproxy.com:8080
- there is no session segment in the username, so the pool is free to give a different exit ip per request.
- the username and the password are percent encoded inside the url, so a password containing @ : / ? or # cannot cut the userinfo short.
- residential advertises asn targeting, but the provider layer has no username segment for it, so it is not offered here.
- the bare uri form, for anything that takes one: proxychains, a browser extension, a scraper settings field, docker build --build-arg.
read next
myx sells proxies with no identity attached. an account is one random 16-digit number: no email, no name, no kyc. you top up in crypto.