Jump to content
McKay Development

Is there a way to change proxy after the constructor?


Akaz

Recommended Posts

Hey,

I'm aware that I can do something like that 

const requestProxy = request.defaults({'proxy':userProxy});
let community = new SteamCommunity({'request': requestProxy});

But this set up a single proxy for the whole instance, while I would like to use a different proxy on different request I do with community

I know I could do that by doing my own request with something like this 

const options = {url: URL, proxy: getRandomProxy()};
request(options, function (err, resp, body) {
  // Here I have a different proxy everytime
});
    

But is there a way to have something similar while using the functions from this package?

Thank you!

 

Edit : Unless it's useless and the rate limite is based on the Steam account rather than the IP used

Edit2 :  After some testing, rate limite seems to be based on account requests rather than IP, making the proxy switch useless. I'll investigate a bit more but probably won't change the result.

Edited by Akaz
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...