Technikhighknee Posted January 24, 2021 Report Share Posted January 24, 2021 const Steam = require('steam-client'); const SteamUser = require('steam-user'); let client = new Steam.CMClient(); let user = new SteamUser(client); client.setHttpProxy("http://someIP:somePort/"); user.logOn(credentials); Is this still the way to go for using a proxy or do I have to do something else? I feel like it is not working anymore, because now I am unable to log into my account. (Windows Steam-Client error says something like: "There were too many failed login attempts on your network. Please try again later.") I can login to 2 of my accounts without steamguard but the one with steamguard does not work. PS: I am new to this forum stuff, I hope I did not forget to mention anything. Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted January 25, 2021 Report Share Posted January 25, 2021 No, that doesn't work anymore as of steam-user v4. Please check the docs for the new way to use a proxy. Quote Link to comment Share on other sites More sharing options...
Technikhighknee Posted January 25, 2021 Author Report Share Posted January 25, 2021 (edited) Thanks for the reply! I have checked the docs and found the option 'httpProxy' wich I assume gets passed into the SteamUser constructor. For testing purposes I have built a module that returns a public http proxy from an api. My code is as followed: const SteamUser = ('steam-user'); const proxy = ('./proxy'); // Basically just gives me a http proxy ip + port string let client; proxy.getProxy() .then(result => { client = new SteamUser({ httpProxy: `http://${result}` }); // Example -> http://123.123.123.123:8080 client.logOn(credentials); client.on('loggedOn', () => { // Do some stuff }); }); Whenever I run this it gives me an error: "Error: HTTP CONNECT 400 Bad Request" Do you have any thoughts about why it would not work? I don't know if I am allowed to post the API url I am using. Tell me if you want to see it. Thank you so much for your time! Edited January 25, 2021 by Technikhighknee Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted January 26, 2021 Report Share Posted January 26, 2021 That looks correct. It's possible that your proxy doesn't like connecting to non-HTTP ports, so you could try enabling the webCompatibilityMode option as well. Quote Link to comment Share on other sites More sharing options...
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.