komarevtsevdn Posted March 18, 2016 Report Posted March 18, 2016 On my site i have a many query method loadUserInventory for different steamid. i wanna to make this method within proxy, coz for very frequent queries steam send error 429. How i can use proxy with u module? Quote
Dr. McKay Posted March 18, 2016 Report Posted March 18, 2016 As of v1.20.0, you can pass your own SteamCommunity to the constructor of TradeOfferManager. You can pass your own request to the SteamCommunity constructor and you can specify a proxy to request via request.defaults. Quote
komarevtsevdn Posted March 19, 2016 Author Report Posted March 19, 2016 But if i wanna change proxy dynamically i need just pass instance request to constructor after each query to Steam? For example i have 10 proxy, and i wanna after each query to Steam change proxy. Quote
Dr. McKay Posted March 19, 2016 Report Posted March 19, 2016 There are HTTP hooks that you can use to override the proxy per-request. Quote
cookie Posted April 9, 2016 Report Posted April 9, 2016 (edited) As of v1.20.0, you can pass your own SteamCommunity to the constructor of TradeOfferManager. You can pass your own request to the SteamCommunity constructor and you can specify a proxy to request via request.defaults. Sorry for grave digging but is this the best approach? var request = require("request"); var TradeOfferManager = require('steam-tradeoffer-manager'); var steamcommunity = require("steamcommunity"); var proxyUrl = "http://" + user + ":" + password + "@" + host + ":" + port; var proxifiedRequest = request.defaults({'proxy': proxyUrl}); var community = new steamcommunity({request: proxifiedRequest}); var manager = new TradeOfferManager({community: community}); Edited April 9, 2016 by cookie Quote
jensej Posted November 15, 2016 Report Posted November 15, 2016 (edited) var request = require("request"); var TradeOfferManager = require('steam-tradeoffer-manager'); var steamcommunity = require("steamcommunity"); var proxyUrl = "http://" + user + ":" + password + "@" + host + ":" + port; var proxifiedRequest = request.defaults({'proxy': proxyUrl}); var community = new steamcommunity({request: proxifiedRequest}); var manager = new TradeOfferManager({community: community}); This code will be have change ip in every new loadUserInventory or every login to steam? Edited November 15, 2016 by jensej Quote
jensej Posted November 24, 2016 Report Posted November 24, 2016 var request = require("request"); var TradeOfferManager = require('steam-tradeoffer-manager'); var steamcommunity = require("steamcommunity"); var proxyUrl = "http://" + user + ":" + password + "@" + host + ":" + port; var proxifiedRequest = request.defaults({'proxy': proxyUrl}); var community = new steamcommunity({request: proxifiedRequest}); var manager = new TradeOfferManager({community: community}); This code will be have change ip in every new loadUserInventory or every login to steam? refresh question Quote
Dr. McKay Posted November 25, 2016 Report Posted November 25, 2016 Once you're logged in, you need to use the same IP for all your requests. Quote
Gamerios Posted February 15, 2017 Report Posted February 15, 2017 Once you're logged in, you need to use the same IP for all your requests. how i can do this with steam-user ? i try new beta of steam-client and steam-user for httpsocket but always get setHttpSocket is not a function is there a other way ? want use the 2 internet access i and friend have here at home ips for split 1 ip to one account and other ip to other account thanks Quote
Dr. McKay Posted February 15, 2017 Report Posted February 15, 2017 It's setHttpProxy, not setHttpSocket. Quote
Gamerios Posted February 15, 2017 Report Posted February 15, 2017 (edited) It's setHttpProxy, not setHttpSocket.Sorry was because ofhttps://github.com/DoctorMcKay/node-steam-client/releases/tag/v2.3.0-betaThere stands setHttpSocket HTTP socket by calling client.setHttpSocket(url) i tryed so but it not works: var steam = require('steam-client'); var steamclient = new steam.CMClient(); steamclient.setHttpProxy(proxyUrl); var SteamUser = require('steam-user'); var client = new SteamUser({steamclient}); to i something wrong ? also when it works is whole node steam-user and steam-client and steamcommunity over proxy or only web // http requests to steamcommunity.com ? Edited February 15, 2017 by Gamerios Quote
Dr. McKay Posted February 15, 2017 Report Posted February 15, 2017 My mistake. I've updated those release notes. Get rid of the curly braces inside your SteamUser constructor: new SteamUser(steamclient). If you do it properly, all communication SteamUser does with Steam goes over the proxy. Quote
freaders Posted February 23, 2017 Report Posted February 23, 2017 is there any good proxy services (even paid) that can be used with the nodejs and steam client? thanks! Quote
Revadike Posted April 15, 2017 Report Posted April 15, 2017 ^ I'd like to know this too.Also for anyone wondering why the solution mentioned above doesn't work for you, it's because you need the latest beta version of steam-client. 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.