Describe the bug
When attempting to log in to Steam using a proxy, Steam still sees my real IP address instead of routing traffic through the proxy. I have tried both HTTP‐over‐HTTP (httpProxy) and SOCKS5 (createConnection + SocksProxyAgent) approaches in two separate test files, but neither one works as expected.
Versions
- steam-user: v5.2.0
- steam-totp: v2.1.2
- socks-proxy-agent: v8.0.5
- Node.js: v22.14.0
- OS: Windows 11
Screenshots and Error Logs
When running either test file, login succeeds but `client.publicIP` reports my real IP, not the proxy’s IP:
No other errors are thrown.
http.js
const SteamUser = require("steam-user");
const SteamTotp = require("steam-totp");
// ––– your 2FA & creds –––
const sharedSecret = "ABCDEFGH1234IJKL=";
const accountName = "myUserName";
const password = "MyP@ssw0rd!";
// just “user:pass@host:port” (percent‑encode any “=” or “@” in your password)
const httpProxy = "user123:pa%40ssw0rd%
[email protected]:8080";
const client = new SteamUser({
httpProxy,
webCompatibilityMode: true,
// you can force raw‑TCP if you like:
// protocol: SteamUser.EConnectionProtocol.TCP
});
client.logOn({
accountName,
password,
twoFactorCode: SteamTotp.generateAuthCode(sharedSecret),
});
client.on("loggedOn", () => {
console.log("✅ Logged in – Steam sees IP as", client.publicIP);
});
client.on("error", (err) => {
console.error("❌ Login error:", err);
});
socks5h.js
const SteamUser = require("steam-user");
const SteamTotp = require("steam-totp");
const { SocksProxyAgent } = require("socks-proxy-agent");
//––– your 2FA & creds –––
const sharedSecret = "ABCDEFGH12345678=";
const accountName = "exampleUser";
const password = "Tr1ckyP@ss";
// your socks5h URL:
const socksUri = "socks5h://fake-user:
[email protected]:1080";
const agent = new SocksProxyAgent(socksUri);
const client = new SteamUser({
// force raw‐TCP
protocol: SteamUser.EConnectionProtocol.TCP,
// whenever steam-user wants a socket, we hand it over to our proxy agent
createConnection: (opts) => agent.createConnection(opts),
autoRelogin: true,
});
client.logOn({
accountName,
password,
twoFactorCode: SteamTotp.generateAuthCode(sharedSecret),
});
client.on("loggedOn", () => {
console.log("✅ Logged in – Steam sees IP as", client.publicIP);
});
client.on("error", (err) => console.error("❌ Login error:", err));