HTTP Sniffer Proxy IP retrieval

Support
  • f1397417-0ec8-4327-8f10-fa93a1ff606e-image.png

    Hi, hoping someone can help.
    When applying a proxy, the resulting IP will appear in HTTP sniffer automatically. Is there a way to save this output straight to a variable i.e. set a variable [[WHATSMYIP]] and save HTTP sniffer IP result.

    Or is there a recommended approach?

    If not, can anyone help improve on this Javascript

    var request = new XMLHttpRequest();
    var websites = [
      'https://api.ipify.org',
      'https://checkip.amazonaws.com/',
      'https://ipapi.co/ip/',
      'https://ip-addr.es/',
      'https://api.ip.sb/ip',
      'https://curlmyip.net/',
      'https://api.myip.la/'
    ];
    
    for (var i = 0; i < websites.length; i++) {
      var url = websites[i];
      request.open('GET', url, false);
    
      try {
        request.send(null);
      } catch (err) {
        console.log('Error occurred: ' + err);
        continue;
      }
    
      if (request.status === 200 && request.responseText !== null) {
        [[WHATSMYIP]] = request.responseText;
        break;
      }
    }
    

    It's worked reliably for months, but now I'm getting the occasional "Timeout during script2 for[documentRoot]" on certain proxies, so I'm not sure if it's error handling and checking all of the IP sites before failing.

    Thanks

  • Ну установите прокси на http клиент
    Отправьте get запрос на http://ip.bablosoft.com/
    Получить содержание ответа да и все на этом