DoctorMcKay / node-steamcommunity

Interact with various interfaces on Steam Community from Node.js
https://dev.doctormckay.com/forum/8-node-steamcommunity/
MIT License
475 stars 127 forks source link

fix bug proxy #283

Open RobotXX1 opened 2 years ago

RobotXX1 commented 2 years ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch steamcommunity@3.44.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/steamcommunity/components/confirmations.js b/node_modules/steamcommunity/components/confirmations.js
index 8c2a579..cdc1d73 100644
--- a/node_modules/steamcommunity/components/confirmations.js
+++ b/node_modules/steamcommunity/components/confirmations.js
@@ -160,7 +160,7 @@ SteamCommunity.prototype.acceptConfirmationForObject = function(identitySecret,
        // time offset is already known and saved
        doConfirmation();
    } else {
-       SteamTotp.getTimeOffset(function(err, offset) {
+       SteamTotp.getTimeOffset(self._options.httpProxy, function(err, offset) {
            if (err) {
                callback(err);
                return;
diff --git a/node_modules/steamcommunity/components/twofactor.js b/node_modules/steamcommunity/components/twofactor.js
index 651c691..d28b064 100644
--- a/node_modules/steamcommunity/components/twofactor.js
+++ b/node_modules/steamcommunity/components/twofactor.js
@@ -61,7 +61,7 @@ SteamCommunity.prototype.finalizeTwoFactor = function(secret, activationCode, ca
            return;
        }

-       SteamTotp.getTimeOffset(function(err, offset, latency) {
+       SteamTotp.getTimeOffset(self._options.httpProxy, function(err, offset, latency) {
            if (err) {
                callback(err);
                return;

This issue body was partially generated by patch-package.

n1lsik commented 2 years ago

Tell me please before that there was an IP address leak?