【转】禁用chrome firefox 的 WebRTC功能防止真实IP泄漏
无论是使用VPN还是其它代理方式,很多时候我们不希望暴露自己的真实IP,且一直以来我们认为VPN是安全的,所有流量都会走VPN。
但最近暴露出一个WebRTC特性,会暴露我们的真实IP。适用浏览器:chrome,firefox. safari则没有问题。
只需要一段js代码就可以获取我们的真实IP。一旦被想时时监控别人的人知道并使用此方法钓鱼,便可直接获得原始IP。这简直太恐怖了。
看来以后如果重装系统,第一件事儿把cnnic证书删除后,第二件事儿就是禁用WebRTC.
有一个插件可以方便的禁用WebRTC, 插件下载
Firefox可在浏览器上输入:about:config。之后搜索:media.peerconnection.enabled。找到它后双击,将其改成 false 即可。
原理可以参考一下这里: https://github.com/diafygi/webrtc-ips
或者直接把下面这段代码放在chrome的console里运行一下,就知道自己的真实IP了。
//get the IP addresses associated with an 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.services.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(){});
}, function(){});
}
//Test: Print the IP addresses into the console
getIPs(function(ip){console.log(ip);});
from:http://ju.outofmemory.cn/entry/333116
【转】禁用chrome firefox 的 WebRTC功能防止真实IP泄漏的更多相关文章
- 如何禁用Chrome / Firefox /IE浏览器的Cookie
Firefox: 点击菜单按钮并点击选项 按钮. 选择 隐私 面板. 将“Firefox 将会:”这一项设置为 使用自定义历史记录设置. 取消 接受来自站点的 Cookie 选项 即可禁用 Cooki ...
- WebRTC 泄漏真实 IP 地址
WebRTC(网页即时通信,Web Real-Time Communication) 它允许浏览器内进行实时语音或视频对话,而无需添加额外的浏览器扩展.包括 Chrome.Firefox.Opera. ...
- Failed to load PDF in chrome/Firefox/IE
笔者的公司搭建了一个Nexus服务器,用来管理我们自己的项目Release构件和Site文档. 今天的问题是当用户访问一个Site里的PDF文件的时候,报错说“detected that the ne ...
- Chrome firefox ie等浏览器空格 宽度不一样怎么办
有点强迫症,之前某个页面用了空格 ,但是在chrome firefox 和ie显示的宽度都不一样,无法对齐. 搜索了一下,很多人都转载了那篇设置成宋体的,可是仍然没对齐,要么ie对齐,要么chrome ...
- 拒绝IE8-,CSS3 transform rotate旋转动画效果(支持IE9+/chrome/firefox)
<!DOCTYPE html> <html> <head> <meta charset=" utf-8"> <meta nam ...
- 禁用backspace键的后退功能
禁用backspace键的后退功能,但是可以删除文本内容<script language="JavaScript">document.onkeydown = check ...
- 【转】【JavaScript】禁用backspace键的后退功能,但是可以删除文本内容
在JavaScript中添加以下代码,就可实现 禁用backspace键的后退功能,但是可以删除文本内容 // 禁用backspace键的后退功能,但是可以删除文本内容 document.onkeyd ...
- 禁用ios7 手势滑动返回功能
禁用ios7 手势滑动返回功能 版权声明:本文为博主原创文章,未经博主允许不得转载. 在有的时候,我们不需要手势返回功能,那么可以在页面中添加以下代码: - (void)viewDidAppear:( ...
- Postman 是一个非常棒的Chrome扩展,提供功能强大的API & HTTP 请求调试
Postman 是一个非常棒的Chrome扩展,提供功能强大的API & HTTP 请求调试 需要FQ才能安装,使用时应该不用FQ了,除非使用postman的历史记录功能: 非常棒的C ...
随机推荐
- ceph 接入OpenStack
创建对应的pool: ceph osd pool create volumes 512 ceph osd pool create images 512 ceph osd pool create vms ...
- @ConfigurationProperties注解和@Value注解的区别
都是读取配置文件属性 1. @ConfigurationProperties(prefix = "person")读取多个属性 @Component @Configuration ...
- ASP.NET Core3.0 中的运行时编译
运行时编译 通过 Razor 文件的运行时编译补充生成时编译. 当 .cshtml 文件的内容发生更改时,ASP.NET Core MVC 将重新编译 Razor 文件 . 通过 Razor 文件的运 ...
- pyspark读取hdfs 二进制文件
程序如下: from pyspark import SparkConf, SparkContext conf = SparkConf().setAppName("My test App&qu ...
- k8s安装之nginx.yaml
这里两个nginx.一个是用来测试最简单的集群的. 另一个是用来作grafana,prometheus,dashboard前端安全展示的. 简单版 apiVersion: apps/v1 kind: ...
- asp、aspx、php、jsp万能密码大全【笔记】
asp aspx万能密码 1:"or "a"="a 2: ')or('a'='a 3:or 1=1-- 4:'or 1=1-- 5:a'or' 1=1-- 6: ...
- mysql 两张表字段模糊匹配--字符串拼接函数
concat(A,B,C,...) 拼接字符串 例如concat('123','***','345') =>123***345 SELECT concat( substr(t1.CODE, ...
- MySQL复制介绍及搭建
MySQL复制介绍 MySQL复制就是一台MySQL服务器(slave)从另一台MySQL服务器(master)进行日志的复制然后再解析日志并应用到自身,类似Oracle中的Data Guard. M ...
- Centos6 克隆后简单的网络配置
第一步:修改主机名 $ vi /etc/sysconfig/network 第二步: $ vi /etc/udev/rules.d/70-persistent-net.rules 注: ...
- python 不能加载pip install的site-package文件
python -m pip install tensorflow-gpu==1.0.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/