Tag Archives: Chrome

浅析宽带运营商劫持

今天请求公司主站裸域会导致莫名奇妙的跳转到yiqifa.com然后再跳转回www域的诡异问题,清理Cookies、更换DNS均无效,郁闷!在公司群里讨论了一下大概可以锁定为宽带运营商劫持,由于之前安装了Wireshark也没怎么用,正好出现类似问题,使用HTTP抓包工具分析再好不过了。关闭大部分的可能产生网络连接的软件,Start&Action!

去掉正常的请求响应包,锁定到302请求,依次向下查看,果然发现了一些猫腻。截图如下:Screen Shot 2015-04-18 at 16.07.18

96号 百度HM请求包61.135.185.140

URL:http://hm.baidu.com/h.js?ca88bf7b092f300a228b2c153a0a9fc8

97号 百度HM响应包61.135.185.140

HTTP 302 Location=http://122.141.234.60:51234/bdpop.sl.php?http://hm.baidu.com/h.js?ca88bf7b092f300a228b2c153a0a9fc8

当浏览器302跳转上述地址时响应Cookie里面增加了一个DIANSHANG=54

 

100号 跳转URL请求包122.141.234.60

URL:http://122.141.234.60:51234/bdpop.sl.php?http://hm.baidu.com/h.js?ca88bf7b092f300a228b2c153a0a9fc8

 

103号TCP超时快速重传包61.135.185.140

HTTP 304

 

106号跳转URL响应包122.141.234.60

HTTP 200

window.location=’http://p.yiqifa.com/n?k=2mLErn2OWE3lrI6H2mLErI6H6ljqWmLm6lwLWN6HWl3FWNtsrI6HkQLErnWLWlDO39MErBXpgZUfgmL-&e=c&t=http://www.wangjiu.com’;

 

117号浏览器加载上述Location请求包

 

我们所看到的劫持发生在96号请求包和97号响应包之间,大致过程如下:

1)浏览器将/h.js的请求(96号)发送到百度;

2)宽带运营商嗅探到这个请求后,会将百度的302响应进行篡改,然后转发至用户浏览器(97号),与此同时对百度TCP连接的响应直接给予超时处理;

3)此时真正的响应(来自百度)可能还未到达用户。这就导致了百度服务器认为响应没有送达用户浏览器-发起TCP快速重传(103号),但是用户浏览器在这个过程已经确认收到响应(来自宽带运营商);

4)根据响应结果,浏览器触发302跳转,然后就是我们所看到的先跳转yiqifa.com(117号)然后yiqifa将它的CPSID带上再跳转回主站(后续包)。

Google Chrome:如何变得更快,更强,更智能

如果你还没有用过Chrome这款浏览器,抓紧安装体验一下吧。在这个比拼浏览器速度的年代,Google完胜Mozilla、微软,特别是JavaScript的性能方面。即便如此,如果你对Chrome做一些额外的调整将会让它更快。

为了我们

To help with that effort, we’ve gathered for your consideration a few of our favorite free Google Chrome. Experience the power enhancements they provide, and in a few days you’ll wonder how you ever survived online with a bare-bones browser.

如果你是Geek,通过Chrome的实验特性发挥CPU、GPU的性能来优化你的网上冲浪。这些特性被隐藏在不起眼的Chrome菜单中,这样做是为了防止初级用户无意搞崩他们的浏览器,所以在这里我们会说明这些特性是如何工作的。速度来围观吧!

效率扩展程序
如果你还没安装最新版的Chrome,猛戳此处下载再说吧。下载完后打开Chrome web商店,你就会看到众多的适合你的扩展程序-游戏、音乐播放器、社交网络等等。
下面列出的这些扩展能够让我们的Chrome更加易用方便。

FastestChrome: 正如它的名字让你有所期待一样,安装上它可以为你节省大量的时间。它主要提供一些界面上的操作。比如你选中一个词想知道它的意思时,它会弹出一个浮动框,提供维基百科、Google、Surf Canyon、DuckDuckGo四个搜索引擎来查看这个词语的解释。

 

这个扩展程序还可以将你选中的URL文本转换为可以点击的链接(这使得阅读那些来自技术一般人写的Email变得非常容易)。除此之外,自动翻页会在你浏览到web网页(比如Google 搜索结果页、一个8页的文章)末尾时自动加载下一页内容而无需点击下一页链接。

Google Quick Scroll: 这个扩展可以让你直接看到目标网站上的搜索关键词。使用它,每次你点击一个搜索链接,一个包含搜索关键词的小组件会显示在目标网页的右下角,点击组件可以直达你要搜索的关键词位置。

Chrome Toolbox: 这个扩展可以让你一次点击打开多个书签;缓存未提交的表单数据从而避免下次再次输入;在浏览器内部放大图片、视频等等,总之,它让Chrome的用途翻倍了。

冒险体验实验特性

运行Chrome,在地址栏键入chrome://flags/ ,回车,打开Chrome实验特性列表,它们会直接影响到你的web浏览性能。如果你想查看其他隐藏的Chrome菜单,在地址栏键入chrome://chrome-urls/ ,回车。flags页面包含了所有的实验特性,所以我们先来说它。

At this is the point, we’d normally offer a disclaimer about messing around with experimental features in an application—but Google has handled that task quite well on its own. 当你进入Chrome flags页面首先会有如下的警告信息:

请小心,这些实验可能有风险 我们随时可能会更改、中止或取消这些实验性功能。因此,我们完全无法保证您启用某项实验性功能后会发生什么情况,您的浏览器甚至可能会自动崩溃。请注意,您的浏览器可能会删除所有的数据,您的安全性和隐私权也有可能遭到意外损害。您启用的所有实验性功能会面向此浏览器的所有用户。请谨慎操作。

Though the stuff we’ll discuss doing in this article is more likely to cause simple rendering errors or to adversely affect performance than to wreak any major havoc, caution is appropriate.

Flipping switches

Google Chrome’s flags menu presents a long list of experimental options, only a few of which focus on performance. They include the following seven options.

Override software rendering list Mac, Windows, Linux, Chrome OS: This option overrides Chrome’s built-in software rendering list and permits GPU acceleration on unsupported system configurations. If you’re running experimental GPU drivers, switching this flag on will probably shorten loading times for games and videos.

GPU compositing on all pages Mac, Windows, Linux: This option will force GPU-accelerated compositing on all webpages, not just those with GPU-accelerated layers. Enabling this option will probably give you a minor speed boost across the board.

Threaded compositing Mac, Windows, Linux, Chrome OS: Threaded compositing will launch a secondary thread on multicore systems dedicated to webpage compositing. Enabling this option may result in smoother scrolling, even if the main thread is busy with other processing duties.

Disable accelerated 2D canvas Mac, Windows, Linux, Chrome OS: Disabling this option prevents the GPU from performing 2D canvas rendering and causes it instead to use the hot CPU for software rendering.

Disable accelerated CSS animations Mac, Windows, Linux, Chrome OS: When threaded compositing is active, accelerated CSS animations run on the compositing thread. However, running accelerated CSS animations, even without the compositor thread, may yield performance gains.

GPU Accelerated SVG Filters Mac, Windows, Linux, Chrome OS: This option taps your GPU to accelerate the rendering of scalable vector graphics filters, which could speed up the loading process on websites that use a lot of heavy drop shadows or other visual filter effects.

Disable GPU VSync Mac, Windows, Linux, and Chrome OS: If you’re a gamer, you’ve probably heard of vertical sync, aka Vsync. Shutting off Vsync disables synchronization with your monitor’s vertical refresh rate. If your monitor has a refresh rate of 60Hz, for example, disabling Vsync allows the GPU to output at a rate faster than 60Hz—or 60 frames per second—when possible.

Depending on your system’s configuration and on your version of Chrome, some of these options may or may not be enabled by default. And depending on the graphics drivers and OS updates you’ve installed, some of them may not have any effect on performance at all. Nevertheless, it’s worth experimenting with them and visiting your favorite websites to see if they produce any benefits. In our experience, the Accelerated 2D canvas and GPU compositing options offer the most extensive advantages. On the other hand, disabling Vsync seemed to cause rendering issues on our Windows 8 Pro-based test systems on websites that use HTML5 animations.

Establishing the benefits (or drawbacks) of many of the experimental settings mentioned above proved to be rather difficult. We did, however, observe some performance differences when we ran quick tests using Rightware’s BrowserMark and some of the browser benchmarks available on the IE 10 Test Drive site.

With all of the hardware acceleration options disabled in Chrome, our Core i3-powered Acer TravelMate test system (with 8GB of RAM and Windows 8 Pro) using Chrome v22.0.1229.96 scored 314,359 in BrowserMark, and it managed a frame rate of 16 frames per second in the “Bubbles” benchmark on the IE 10 Testdrive site.

Enabling GPU and threaded compositing in Chrome resulted produced a BrowserMark score of 351,492, but had no impact on the Bubbles benchmark. Enabling the other features (and disabling Vsync) yielded a Browsermark score of 361,687; however, the Bubble benchmark wouldn’t render properly and wasn’t fully visible on-screen. Reenabling Vsync fixed the Bubble benchmark, and bumped the measured frame rate to 27 fps. Specifically, the Accelerated 2D canvas setting boosted the graphics performance in the Bubbles test.

If you already have a fast system and you keep your software, drivers, and browser version up-to-date, it probably already uses some form of hardware acceleration—and its performance should be quite good. Even so, experimenting with some of the hidden features in Chrome may net some additional performance for free, and that’s never a bad thing.

原文链接:http://www.pcworld.com/article/2027955/google-chrome-how-to-make-it-faster-smarter-and-better-than-before.html