CHAN.RUN
The hub provides two proxy protocols on localhost. Configure your tools to use either one.
| Protocol | Default Address | Use When |
|---|---|---|
| SOCKS5 | 127.0.0.1:1080 | Most tools support it. Preferred for general use. |
| HTTP CONNECT | 127.0.0.1:1081 | When your tool only supports HTTP proxies. |
The simplest way — set it once, all tools that respect proxy environment variables use it:
export ALL_PROXY=socks5://localhost:1080Or be more specific:
export HTTP_PROXY=http://localhost:1081
export HTTPS_PROXY=http://localhost:1081# SOCKS5
curl --proxy socks5://localhost:1080 https://httpbin.org/ip
# HTTP CONNECT
curl --proxy http://localhost:1081 https://httpbin.org/ip
# Named node selection
curl --proxy socks5://vienna-home:x@localhost:1080 https://httpbin.org/ipconst browser = await chromium.launch({
proxy: {
server: 'socks5://localhost:1080',
},
});Or with named node selection:
const browser = await chromium.launch({
proxy: {
server: 'socks5://localhost:1080',
username: 'vienna-home',
password: 'x',
},
});const browser = await puppeteer.launch({
args: ['--proxy-server=socks5://localhost:1080'],
});import requests
proxies = {
'http': 'socks5://localhost:1080',
'https': 'socks5://localhost:1080',
}
response = requests.get('https://httpbin.org/ip', proxies=proxies)Requires the requests[socks] extra: pip install requests[socks]
from aiohttp_socks import ProxyConnector
import aiohttp
connector = ProxyConnector.from_url('socks5://localhost:1080')
async with aiohttp.ClientSession(connector=connector) as session:
async with session.get('https://httpbin.org/ip') as response:
print(await response.json())Requires aiohttp-socks: pip install aiohttp-socks
import { ProxyAgent } from 'undici';
const agent = new ProxyAgent('socks5://localhost:1080');
const response = await fetch('https://httpbin.org/ip', {
dispatcher: agent,
});# wget doesn't support SOCKS5 natively — use HTTP CONNECT
https_proxy=http://localhost:1081 wget -qO- https://httpbin.org/ipIf you want a browser on your local machine to route through Restunnel, forward the hub's SOCKS5 port over SSH:
ssh -L 1080:127.0.0.1:1080 user@your-serverThen configure your browser to use localhost:1080 as a SOCKS5 proxy. Traffic flows: Browser → SSH tunnel → Restunnel Hub → Exit Node → Internet.