Jump to content
McKay Development

Recommended Posts

Posted (edited)

Hi.

I'm using this code:

 

    let proxyUrl = "http://" + proxyUser + ":" + proxyPassword + "@" + proxyHost + ":" + proxyPort;
    let proxifiedRequest = request.defaults({
        'proxy': proxyUrl
    });

let steamClient = new SteamClient.CMClient();
    steamClient.setHttpProxy(proxyUrl);
    let community = new SteamCommunity({
        request: proxifiedRequest
    });
    let client = new SteamUser(steamClient);

    let manager = new TradeOfferManager({
        "steam": client,
        "community": community,
        "language": "en",
        "cancelTime": 120000,
        "pendingCancelTime": 30000
    });

 

and after loggin in I'm checking IP using this property

 

client.publicIP

 

 

but it shows my IP withput proxy. Am I missing something here?

 

PS. 1 more unrelated question: how can I check If tradeoffer manger is fully logged in and nothing happened after initial loggin in (nothing disconnected and so on) and it is ready to send trades?

 

Thx in advance

Edited by JVz
Posted

What version of steam-user are you using?

 

PS. 1 more unrelated question: how can I check If tradeoffer manger is fully logged in and nothing happened after initial loggin in (nothing disconnected and so on) and it is ready to send trades?

 

It's ready to send trades once the callback fires without an error when you call setCookies.

Posted

What version of steam-user are you using?

 

"steam-user": "^4.12.4"

 

 

 

It's ready to send trades once the callback fires without an error when you call setCookies.

Yes, but after some time community or client can disconnect or socket can hang up, and bot has to do relog, the problem is that disconnect event sometimes doesnt fire so I'm checking if everything is online and ready for trades before creating tradeoffer. Maybe there is a better way to do it?

Posted (edited)

Works fine if I put httpProxy in constructor

let client = new SteamUser({"httpProxy": proxyUrl});

 

thx for help

Edited by JVz

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...