This guide is for beginners and shows how to configure Resin proxy settings in common shells: pwsh, bash, and zsh.
Default endpoints (based on the README examples):
- HTTP proxy:
http://127.0.0.1:2260 - SOCKS5 proxy:
socks5h://127.0.0.1:1080(socks5his recommended so DNS is resolved by the proxy side)
If Resin auth is enabled (RESIN_AUTH_VERSION=V1 and RESIN_PROXY_TOKEN is not empty), credentials are:
- Username:
PlatformorPlatform.Account(Accountis optional) - Password:
RESIN_PROXY_TOKEN
Examples:
- HTTP (Platform only):
http://Asia:my-token@127.0.0.1:2260 - HTTP (Platform + Account):
http://Asia.user_tom:my-token@127.0.0.1:2260 - SOCKS5 (Platform only):
socks5h://Asia:my-token@127.0.0.1:1080 - SOCKS5 (Platform + Account):
socks5h://Asia.user_tom:my-token@127.0.0.1:1080
If you do not need account-level sticky routing, use
Platformonly. If you need sticky routing per account, usePlatform.Account.
If RESIN_PROXY_TOKEN="" (empty string), credentials can be omitted.
# Prefer setting HTTP/HTTPS first
$env:HTTP_PROXY = "http://Asia.user_tom:my-token@127.0.0.1:2260"
$env:HTTPS_PROXY = $env:HTTP_PROXY
# Optional: SOCKS5 via ALL_PROXY
$env:ALL_PROXY = "socks5h://Asia.user_tom:my-token@127.0.0.1:1080"
# Bypass local addresses
$env:NO_PROXY = "localhost,127.0.0.1,::1"[Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://Asia.user_tom:my-token@127.0.0.1:2260", "User")
[Environment]::SetEnvironmentVariable("HTTPS_PROXY", "http://Asia.user_tom:my-token@127.0.0.1:2260", "User")
[Environment]::SetEnvironmentVariable("ALL_PROXY", "socks5h://Asia.user_tom:my-token@127.0.0.1:1080", "User")
[Environment]::SetEnvironmentVariable("NO_PROXY", "localhost,127.0.0.1,::1", "User")# Check
Get-ChildItem Env: | Where-Object Name -Match "PROXY"
# Unset in current session
Remove-Item Env:HTTP_PROXY,Env:HTTPS_PROXY,Env:ALL_PROXY,Env:NO_PROXY -ErrorAction SilentlyContinue
# Remove persisted user vars
[Environment]::SetEnvironmentVariable("HTTP_PROXY", $null, "User")
[Environment]::SetEnvironmentVariable("HTTPS_PROXY", $null, "User")
[Environment]::SetEnvironmentVariable("ALL_PROXY", $null, "User")
[Environment]::SetEnvironmentVariable("NO_PROXY", $null, "User")export HTTP_PROXY="http://Asia.user_tom:my-token@127.0.0.1:2260"
export HTTPS_PROXY="$HTTP_PROXY"
export ALL_PROXY="socks5h://Asia.user_tom:my-token@127.0.0.1:1080"
export NO_PROXY="localhost,127.0.0.1,::1"
# Compatibility: some tools only read lowercase vars
export http_proxy="$HTTP_PROXY"
export https_proxy="$HTTPS_PROXY"
export all_proxy="$ALL_PROXY"
export no_proxy="$NO_PROXY"Append:
export HTTP_PROXY="http://Asia.user_tom:my-token@127.0.0.1:2260"
export HTTPS_PROXY="$HTTP_PROXY"
export ALL_PROXY="socks5h://Asia.user_tom:my-token@127.0.0.1:1080"
export NO_PROXY="localhost,127.0.0.1,::1"
export http_proxy="$HTTP_PROXY"
export https_proxy="$HTTPS_PROXY"
export all_proxy="$ALL_PROXY"
export no_proxy="$NO_PROXY"Apply:
source ~/.bashrc# Check
env | grep -i proxy
# Unset in current session
unset HTTP_PROXY HTTPS_PROXY ALL_PROXY NO_PROXY
unset http_proxy https_proxy all_proxy no_proxyZsh is the same as Bash, but uses ~/.zshrc.
export HTTP_PROXY="http://Asia.user_tom:my-token@127.0.0.1:2260"
export HTTPS_PROXY="$HTTP_PROXY"
export ALL_PROXY="socks5h://Asia.user_tom:my-token@127.0.0.1:1080"
export NO_PROXY="localhost,127.0.0.1,::1"
export http_proxy="$HTTP_PROXY"
export https_proxy="$HTTPS_PROXY"
export all_proxy="$ALL_PROXY"
export no_proxy="$NO_PROXY"Put the same export block into ~/.zshrc, then run:
source ~/.zshrcunset HTTP_PROXY HTTPS_PROXY ALL_PROXY NO_PROXY
unset http_proxy https_proxy all_proxy no_proxy# Check egress IP (should become proxy egress IP)
curl https://api.ipify.orgTo explicitly test SOCKS5:
curl --proxy "socks5h://Asia.user_tom:my-token@127.0.0.1:1080" https://api.ipify.orgSome tools only read lowercase vars (http_proxy, etc.), so set both uppercase and lowercase.
Set NO_PROXY=localhost,127.0.0.1,::1 to avoid proxying local traffic.
Check:
- You are using V1 format:
PlatformorPlatform.Accountwith passwordRESIN_PROXY_TOKEN - Platform exists (for example
Asia) - Token matches
RESIN_PROXY_TOKEN - Special characters in username/password are URL-encoded if needed