ancymon Posted Sunday at 01:12 PM Report Posted Sunday at 01:12 PM 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: Quote PS C:\path\to\test> node http.js ✅ Logged in – Steam sees IP as xxx.xxx.xxx.xxx (<= logs out my real IP) PS C:\path\to\test> node socks5h.js ✅ Logged in – Steam sees IP as xxx.xxx.xxx.xxx (<= logs out my real 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)); Rage 1 Quote
Dr. McKay Posted yesterday at 08:49 AM Report Posted yesterday at 08:49 AM The string you pass to httpProxy needs to start with http:// createConnection is not a valid option for the SteamUser constructor. To use a SOCKS proxy, you should use the socksProxy option. Quote
ancymon Posted yesterday at 09:25 AM Author Report Posted yesterday at 09:25 AM (edited) 43 minutes ago, Dr. McKay said: The string you pass to httpProxy needs to start with http:// createConnection is not a valid option for the SteamUser constructor. To use a SOCKS proxy, you should use the socksProxy option. Thank you so much for your help and proposed fix, but unfortunately it still doesn’t work in my case. I've focused on httpProxy this time. Below are the details. Output: Quote PS C:\Users\ancymon\Downloads\testlab> node .\http.js ❌ Login error: Error: Request timed out at timeoutPromise (…\node_modules\@doctormckay\stdlib\lib\promises\timeoutPromise.js:12:15) at HttpClient.request (…\node_modules\@doctormckay\stdlib\lib\http\client\HttpClient.js:63:46) at SteamUser._apiRequest (…\node_modules\steam-user\components\06-webapi.js:60:26) at SteamUser._doConnection (…\node_modules\steam-user\components\09-logon.js:296:32) at Timeout._onTimeout (…\node_modules\steam-user\components\09-logon.js:316:27) at listOnTimeout (node:internal/timers:594:17) at process.processTimers (node:internal/timers:529:7) Code: const SteamUser = require("steam-user"); const SteamTotp = require("steam-totp"); // ––– your 2FA & creds (censored) ––– const sharedSecret = "*****"; const accountName = "*****"; const password = "*****"; // proxy must start with "http://" const httpProxy = "http://*****:*****@*****:8000"; const client = new SteamUser({ httpProxy, webCompatibilityMode: true, // protocol: SteamUser.EConnectionProtocol.TCP, // uncomment to force raw‑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); }); Proxy test: Quote C:\Users\ancymon>curl -x "http://*****:*****@*****:8000" "https://steamcommunity.com" curl: (56) CONNECT tunnel failed, response 502 Quote C:\Users\ancymon>curl -x "http://*****:*****@*****:8000" "https://ip.smartproxy.com/json" { "browser": { "name": "", "version": "" }, "platform": { "os": "undefined undefined" }, "engine": {}, "isp": { "isp": "***********", "asn": ******, "domain": "", "organization": "***********vv" }, "city": { "name": "", "code": "", "state": "", "time_zone": "***********", "zip_code": "", "latitude": **.****, "longitude": **.*** }, "proxy": { "ip": "***.***.***.***" }, "country": { "code": "**", "name": "***********", "continent": "***********" } } Edited yesterday at 09:32 AM by ancymon Quote
Dr. McKay Posted 3 hours ago Report Posted 3 hours ago You've got some problem with your proxy being unable to connect to Steam, it seems. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.