BeepIsla / csgo-commend-bot

Commend/Report bot in NodeJS
GNU Affero General Public License v3.0
289 stars 144 forks source link

http 405 error #537

Closed acuifex closed 4 years ago

acuifex commented 4 years ago

Detailed bug description i'm getting 405 when using nordvpn as a proxy, but sometimes it works a few times for some reason. i write my proxies like this:

[
"http://de908.nordvpn.com:80:<nordlog>@example.com:<nordpass>"
]

i censored account names because it might be a sensitive info.

Error

`Checking for new update... 
 Up to date! 
 Checking protobufs... 
 Found protobufs 
 Loading proxies... 
 Got 207 proxies 
 Opening database... 
 There are a total of 1168 operational accounts 
 Logging into target account 
 Chunking 20 accounts into groups of 20... 
 Getting an available server 
 Selected available server 90137208089815042 
 Logging into fetcher account for commend count... 
 Current target commends: F41 T41 L41 
 Logging in on chunk 1/1 
 [accountname1] Logging into Steam 
 [accountname2] Logging into Steam 
 [accountname3] Logging into Steam 
 [accountname4] Logging into Steam 
 [accountname5] Logging into Steam 
 [accountname6] Logging into Steam 
 [accountname7] Logging into Steam 
 [accountname8] Logging into Steam 
 [accountname9] Logging into Steam 
 [accountname10] Logging into Steam 
 [accountname11] Logging into Steam 
 [accountname12] Logging into Steam 
 [accountname13] Logging into Steam 
 [accountname14] Logging into Steam 
 [accountname15] Logging into Steam 
 [accountname16] Logging into Steam 
 [accountname17] Logging into Steam 
 [accountname18] Logging into Steam 
 [accountname19] Logging into Steam 
 [accountname20] Logging into Steam 
 [accountname1] Failed to login and due to proxy timeout (1/20) {
  name: 'Error',
  message: 'HTTP CONNECT 405 Method Not Allowed',
  stack: 'Error: HTTP CONNECT 405 Method Not Allowed\n' +
    '    at ClientRequest.<anonymous> (/home/acuifex/Programs/csgo-commend-bot/node_modules/steam-user/components/connection_protocols/tcp.js:59:29)\n' +
    '    at ClientRequest.emit (events.js:310:20)\n' +
    '    at Socket.socketOnData (_http_client.js:503:11)\n' +
    '    at Socket.emit (events.js:310:20)\n' +
    '    at addChunk (_stream_readable.js:286:12)\n' +
    '    at readableAddChunk (_stream_readable.js:268:9)\n' +
    '    at Socket.Readable.push (_stream_readable.js:209:10)\n' +
    '    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)'
} 
~snip~
 [accountname13] Failed to login and due to proxy timeout (20/20) {
  name: 'Error',
  message: 'HTTP CONNECT 405 Method Not Allowed',
  stack: 'Error: HTTP CONNECT 405 Method Not Allowed\n' +
    '    at ClientRequest.<anonymous> (/home/acuifex/Programs/csgo-commend-bot/node_modules/steam-user/components/connection_protocols/tcp.js:59:29)\n' +
    '    at ClientRequest.emit (events.js:310:20)\n' +
    '    at Socket.socketOnData (_http_client.js:503:11)\n' +
    '    at Socket.emit (events.js:310:20)\n' +
    '    at addChunk (_stream_readable.js:286:12)\n' +
    '    at readableAddChunk (_stream_readable.js:268:9)\n' +
    '    at Socket.Readable.push (_stream_readable.js:209:10)\n' +
    '    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)'
} 
 Chunk 1/1 finished with 0 successful commends and 20 failed commends 
 Logging into fetcher account for commend count... 
 Current target commends: F41 T41 L41 
 Change: 
 - F +0 
 - T +0 
 - L +0 
 Finished all chunks with a total of 0 successful and 20 failed commends 
`

Config

`{
    "commend": {
        "friendly": 20,
        "teaching": 20,
        "leader": 20
    },
    "report": {
        "aimbot": 10,
        "wallhack": 10,
        "speedhack": 10,
        "teamharm": 10,
        "abusive": 10
    },
    "account": {
        "username": "target",
        "password": "acc",
        "sharedSecret": ""
    },
    "fetcher": {
        "username": "thowaway",
        "password": "acc",
        "sharedSecret": "",
        "maxTries": 10,
        "tryDelay": 2500,
        "askSteamGuard": false
    },
    "proxy": {
        "enabled": true,
        "file": "proxies.txt",
        "switchProxyEveryXaccounts": 20
    },
    "type": "COMMEND",
    "method": "LOGIN",
    "target": "https://steamcommunity.com/profiles/myprofile/",
    "serverID": "[A:1:3341319169:15188]",
    "matchID": "0",
    "perChunk": 20,
    "betweenChunks": 1000,
    "cooldown": 28800000,
    "showCommends": true,
    "autoReportOnMatchEnd": false,
    "switchServerAfterChunks": 5,
    "steamWebAPIKey": "meh",
    "disableUpdateCheck": false
}
`

Version

BeepIsla commented 4 years ago

Sometimes it works and sometimes it doesn't?

I assume this is because of Steam's differing connection protocols. You can either connect to Steam using TCP or WebSocket, I assume your proxy is blocking TCP connections but allows WebSockets.

There are ways to force what type of connection protocol to use but this is not implemented at the moment. I will add a new optional config option to force protocol in the future.

acuifex commented 4 years ago

It worked something like 20 times for me at the end of commenting a few times. you're probably right. There are some features from nord that could have some effect on that:

    "features": {
      "ikev2": false,
      "openvpn_udp": false,
      "openvpn_tcp": false,
      "socks": false,
      "proxy": false,
      "pptp": false,
      "l2tp": false,
      "openvpn_xor_udp": true,
      "openvpn_xor_tcp": true,
      "proxy_cybersec": false,
      "proxy_ssl": false,
      "proxy_ssl_cybersec": false,
      "ikev2_v6": false,
      "openvpn_udp_v6": false,
      "openvpn_tcp_v6": false,
      "wireguard_udp": false,
      "openvpn_udp_tls_crypt": false,
      "openvpn_tcp_tls_crypt": false,
      "openvpn_dedicated_udp": false,
      "openvpn_dedicated_tcp": false,
      "skylark": false
    }

edit: that is just random server. i obviously use proxy ssl ones.

BeepIsla commented 4 years ago

Potentially fixed in 0fb0418ce170c104c5026984af866d6d1f56c800?

Please update the bot and update your config with the new protocol option, set it to WebSocket then try again. Report back if it works or not.

acuifex commented 4 years ago

With tcp i get 405 and with websocket:

 [accountname] Failed to login and due to proxy timeout (20/20) {
  name: 'Error',
  message: 'Failed to log in within given 60000ms',
  stack: 'Error: Failed to log in within given 60000ms\n' +
    '    at Timeout._onTimeout (/home/acuifex/Programs/csgo-commend-bot/helpers/account.js:60:12)\n' +
    '    at listOnTimeout (internal/timers.js:549:17)\n' +
    '    at processTimers (internal/timers.js:492:7)'
} 

config:

    "commend": {
        "friendly": 20,
        "teaching": 20,
        "leader": 20
    },
    "report": {
        "aimbot": 10,
        "wallhack": 10,
        "speedhack": 10,
        "teamharm": 10,
        "abusive": 10
    },
    "account": {
        "username": "1",
        "password": "2",
        "sharedSecret": ""
    },
    "fetcher": {
        "username": "2",
        "password": "1",
        "sharedSecret": "",
        "maxTries": 10,
        "tryDelay": 2500,
        "askSteamGuard": false
    },
    "proxy": {
        "enabled": true,
        "file": "proxies.txt",
        "switchProxyEveryXaccounts": 1
    },
    "type": "COMMEND",
    "method": "LOGIN",
    "target": "https://steamcommunity.com/profiles/acc/",
    "serverID": "[A:1:3341319169:15188]",
    "matchID": "0",
    "perChunk": 20,
    "betweenChunks": 1000,
    "cooldown": 28800000,
    "showCommends": true,
    "autoReportOnMatchEnd": false,
    "switchServerAfterChunks": 5,
    "protocol": "WebSocket",
    "steamWebAPIKey": "f",
    "disableUpdateCheck": false
}
BeepIsla commented 4 years ago

Last try, update again and set protocol to WebCompatibility

acuifex commented 4 years ago

still same as websocket. maybe nord isn't good for steam or i search for wrong servers. also

    "WEBSOCKET": 2,

    "WEBCOMPATABILITY": 2
BeepIsla commented 4 years ago

That is on purpose. WebCompatibility forces WebSocket mode

BeepIsla commented 4 years ago

Yeah I am out of ideas, I assume Steam blocked some NordVPN IP's

acuifex commented 4 years ago

i can provide you some public nord accs if you want to test at some point. telegram @acuifex or gitter same nickname.

BeepIsla commented 4 years ago

Not gonna solve anything. Just use a other/better proxies.