是否有可能做浏览器中的路由跟踪? [英] Is it possible to do a traceroute in the browser?

查看:253
本文介绍了是否有可能做浏览器中的路由跟踪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个方式做一个路由跟踪客户端,即在浏览器中。

I'm looking for a way to do a traceroute client-side, i.e. in a browser.

据我所知,这是不可能通过JavaScript或Flash发送ICMP,UDP或TCP数据包arbitraty TTL值。我知道闪存允许通过ActionScript中的Socket类的TCP连接,但它似乎不是很有用跟踪路由实现中。

As far as I know, it's not possible to send ICMP, UDP or TCP packets with arbitraty TTL values via Javascript or Flash. I know Flash allows TCP connections via the Socket class in Actionscript but it doesn't seem useful for a traceroute implementation.

是开发一个浏览器插件,唯一的解决办法?

Is the only solution to develop a browser plug-in ?

修改:我刚刚发现,它已经完成了Java小程序:<一href="http://www.$c$cfromthe70s.org/traceroute.aspx">http://www.$c$cfromthe70s.org/traceroute.aspx

EDIT: I just found out that it has been done with a Java applet: http://www.codefromthe70s.org/traceroute.aspx

坏消息是,这个小程序需要进行签名code,因为它实际上分析从平底层客户端系统的可执行输出。这一点是因为,用户被要求以允许Java的应用程序来运行,这是麻烦的。

The bad news is that this applet requires to be signed code because it actually parses the output from the ping executable of the underlying client system. Because of this, the user is asked to allow the Java application to run, which is cumbersome.

这里更多信息:<一href="http://www.$c$cfromthe70s.org/traceroute_explained.aspx">http://www.$c$cfromthe70s.org/traceroute_explained.aspx

我还在寻找一个简单的解决方案,如果有人可以提供帮助。

I am still looking for a simpler solution if anyone can help.

编辑2 :感谢您的anwsers。我想我会去与Java的话。

EDIT 2: Thanks for your anwsers. I guess I'll have to go with Java then.

不知氯化钠( HTTP://$c$c.google.com/p/nativeclient/ )将支持某种路由跟踪应用程序。

I wonder if NaCl ( http://code.google.com/p/nativeclient/ ) would support some kind of traceroute app.

推荐答案

您无法从浏览器做到这一点的。 JavaScript可以在最好打开连接返回到其原始服务器的AJAX请求,但是只能通过HTTP这样做。闪存只能通过TCP交谈的任意主机,但只有当他们被列在源服务器上的crossdomain.xml文件,并再次。 UDP支持闪光灯显然正在申请中。

You can't do this at all from a browser. Javascript can at best open a connection back to its originating server for AJAX requests, but can only do so via HTTP. Flash can talk to arbitrary hosts, but only if they're listed in a crossdomain.xml file on the originating server, and again only via TCP. UDP support in Flash is apparently pending.

和跟踪路由平都是基于ICMP协议和不能创建/从Flash或Java脚本来控制。他们也都需要原始访问构建自定义数据包,这绝对不能做浏览器端。这就是为什么'平'是在Unix系统中的SUID计划,为原始数据包访问需要root权限。

Traceroute and ping are both ICMP-based protocols and cannot be created/controlled from Flash or Javascript. They also both require 'raw' access to build custom packets, and this definitely cannot be done browser-side. This is why 'ping' is an 'SUID' program on Unix systems, as raw packet access requires root privileges.

目前最好的,你可以做一个服务器端执行,并有发送到浏览器的输出。即使如此,你最有可能无法从一个在服务器进程做在Unix下,作为Web服务器是不太可能以root身份运行。你不得不执行系统ping和/或路由跟踪,并将输出重定向回浏览器。

At best you can do a server-side implementation and have the output sent to the browser. And even then, you most likely could not do it from an in-server process on a Unix box, as the web server is unlikely to be running as root. You'd have to execute the system ping and/or traceroute and redirect the output back to the browser.

这篇关于是否有可能做浏览器中的路由跟踪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆