Examples
curl, Python, Node.js and Go.
curl
curl -x http://USER-cc-de:PASS@eu.tpp.io:8888 https://api.ipify.org
curl -x socks5h://USER-cc-de:PASS@eu.tpp.io:8888 https://api.ipify.org
Python
import requests
proxy = "http://USER-cc-de:PASS@eu.tpp.io:8888"
r = requests.get("https://api.ipify.org", proxies={"http": proxy, "https": proxy})
print(r.text)
Node.js
import { ProxyAgent } from 'undici'
const agent = new ProxyAgent('http://USER-cc-de:PASS@eu.tpp.io:8888')
const res = await fetch('https://api.ipify.org', { dispatcher: agent })
console.log(await res.text())
Go
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
proxy, _ := url.Parse("http://USER-cc-de:PASS@eu.tpp.io:8888")
client := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxy)}}
res, err := client.Get("https://api.ipify.org")
if err != nil {
panic(err)
}
defer res.Body.Close()
ip, _ := io.ReadAll(res.Body)
fmt.Println(string(ip))
}