Linuxword Global
当前位置: 通信协议 > LookingGlass搭建教程 一个能监测服务器回程线路质量的软件

检测服务器的回程线路,是每个VPS玩家的必备技能。检测方法通常都是SSH连接上VPS后使用traceroute命令或者mtr命令,或者安装ipip的besttrace查看回程,还能查看回程IP的运营商和归属地。但是,每次测试回程都要连接SSH服务器,而且还要提前获取自己的IP,才能进行路由追踪,很麻烦。比如,你到你朋友家,网速很慢,你想看看回程路由,还要连接SSH…那就更麻烦了。有没有一个工具能快速查看回程线路呢?
有,那就是LookingGlass。一般IDC的商家会提供LookingGlass,但也有很多不提供,或者官方的线路跟自己的线路有细微的差别。
好在自己搭建LookingGlass并不难,注意避坑就可以了,下面是教程。

LookingGlass
LookingGlass(修改版)源代码:https://github.com/ILLKX/LookingGlass/

LookingGlass源代码:https://github.com/telephone/LookingGlass

推荐使用修改版,修改版不仅增加了对PHP7的支持;traceroute使用的是ipip的besttrace,相较于原版,还能查看回程IP的运营商和归属地。

默认已经安装了HTTP服务端(Nginx、Apache等) PHP 安装这些也很简单,有lnmp、宝塔等,相关教程很多,在此就不赘述了。

安装
下载LookingGlass源代码到服务器,建议下载到网站目录中,就不用移动了

wget https://github.com/ILLKX/LookingGlass/archive/master.zip
解压

unzip master.zip
修改文件夹名称

mv LookingGlass-master lg
进行安装:

bash lg/LookingGlass/configure.sh
按照提示进行安装:

########################################
#
# LookingGlass is a user-friendly script
# to create a functional Looking Glass
# for your network.
#
# Created by Nick Adams (telephone)
# http://iamtelephone.com
#
########################################

Do you wish to install LookingGlass? (y/n): y

### ###
# Starting install #
### ###

#这一步是检查相关依赖是否安装 没有安装的话会自动安装的
Checking script requirements:
Checking for host...
Checking for mtr...
Checking for ping...
Checking for traceroute...
Checking for sqlite3...

Checking for previous config:
Creating Config.php...

Creating test files:
Test files already exist...

### ###
# Starting configuration #
### ###

Running setup:
#输入网站的名字,会显示在标题和header上
Enter your website name (Header/Logo) []: Xiaomage`s LookingGlass
#输入lookingGlass的URL(你想把LG放在哪,包含http协议头)
Enter the public URL to this LG (including http://) []: https://bbx.xmgspace.me/lg
#服务器位置 可不填
Enter the servers location []: San Jose, LA, USA
#服务器IP 为了放在IP泄露,可不填
Enter the test IPv4 address []:
#IPv6地址 可不填
Enter the test IPv6 address (Re-enter everytime this script is run) []:
#生成测速文件的大小 可不填
Enter the size of test files in MB (Example: 25 50 100) []:
#限制每个IP每小时的测试次数 选n就表示不开启此功能
Do you wish to enable rate limiting of network commands? (y/n): n
#不选择其他主题,主题就一套
Would you like to choose a different theme? (y/n): n

Creating Config.php...

Creating SQLite database...
#输入服务器的用户名或用户组 root一把梭
Enter the username of your webserver (E.g. www-data): root
Enter the user group of your webserver (E.g. www-data): root
Fixing besttrace permissions...

Installation is complete

这样安装过程就完成了。访问你的网站:http://你的域名/lg就可以看到LookingGlass的主界面了。可以显示出你的IP,点击你的IP地址,就会自动输入到输入框中。

lookingglass

如果点击开始测试后没有响应,原因可能是因为LookingGlass调用了mtr等系统命令,某些环境会默认禁止这些函数,修改php.ini就可以解除限制。

Demo测试地址

测试

分辨填写测试的网站或者IP,测试类型,并点击Run Test即可开始测试。

ping

「梦想一旦被付诸行动,就会变得神圣,如果觉得我的文章对您有用,请帮助本站成长」

赞(0) 打赏
一分也是爱

支付宝扫一扫打赏

微信扫一扫打赏

上一篇:

下一篇:

相关推荐

博客简介

本站CDN采用VmShell免费提供离中国大陆最近的香港CMI高速网络做支撑,ToToTel打造全球最快速的边沿网络支撑服务,具体详情请见 :https://vmshell.com/ 以及 https://tototel.com/,网站所有的文件和内容禁止大陆网站搬迁复制,谢谢,VPS营销投稿邮箱: admin@linuxxword.com,我们免费帮大家发布,不收取任何费用,请提供完整测试文稿!

精彩评论

友情链接

他们同样是一群网虫,却不是每天泡在网上游走在淘宝和网游之间、刷着本来就快要透支的信用卡。他们或许没有踏出国门一步,但同学却不局限在一国一校,而是遍及全球!申请交换友链

站点统计

  • 文章总数: 2331 篇
  • 草稿数目: 12 篇
  • 分类数目: 6 个
  • 独立页面: 0 个
  • 评论总数: 2 条
  • 链接总数: 0 个
  • 标签总数: 5981 个
  • 注册用户: 139 人
  • 访问总量: 8,654,809 次
  • 最近更新: 2024年4月25日