手写DNS服务器测速程序(工具分享)
目的
为路由器设置dns时往往不知道如何设置dns为最佳,网上搜的脚本都不好用,于是手写了这个程序。
特性
- 多DNS服务器并发测试
- 每个DNS服务器测试多次测试取速度最快的结果
- 支持默认DNS测试测试或者文件自定义DNS服务器测试
- 结果按照DNS速度排序。
下载地址
使用方法
>> race-dns-speed.exe
Enter a domain: www.baidu.com
DNS resolution for www.baidu.com at 114.114.114.114 took 364.41 ms
DNS resolution for www.baidu.com at 208.67.220.220 took 395.63 ms
DNS resolution for www.baidu.com at 101.226.4.6 took 470.03 ms
DNS resolution for www.baidu.com at 223.6.6.6 took 470.03 ms
DNS resolution for www.baidu.com at 180.76.76.76 took 470.54 ms
DNS resolution for www.baidu.com at 119.29.29.29 took 473.33 ms
DNS resolution for www.baidu.com at 208.67.222.222 took 475.09 ms
DNS resolution for www.baidu.com at 223.5.5.5 took 477.62 ms
DNS resolution for www.baidu.com at 101.101.101.101 took 478.43 ms
DNS resolution for www.baidu.com at 8.8.8.8 took 480.65 ms
DNS resolution for www.baidu.com at 112.124.47.27 took 481.81 ms
DNS resolution for www.baidu.com at 114.215.126.16 took 487.02 ms
DNS resolution for www.baidu.com at 8.8.4.4 took 487.75 ms
DNS resolution for www.baidu.com at 123.125.81.6 took 490.54 ms
Enter a domain: www.sohu.com
DNS resolution for www.sohu.com at 223.6.6.6 took 362.69 ms
DNS resolution for www.sohu.com at 223.5.5.5 took 364.30 ms
DNS resolution for www.sohu.com at 8.8.4.4 took 367.48 ms
DNS resolution for www.sohu.com at 208.67.222.222 took 370.11 ms
DNS resolution for www.sohu.com at 208.67.220.220 took 370.11 ms
DNS resolution for www.sohu.com at 101.101.101.101 took 371.72 ms
DNS resolution for www.sohu.com at 119.29.29.29 took 372.36 ms
DNS resolution for www.sohu.com at 123.125.81.6 took 459.76 ms
DNS resolution for www.sohu.com at 114.215.126.16 took 461.91 ms
DNS resolution for www.sohu.com at 112.124.47.27 took 462.23 ms
DNS resolution for www.sohu.com at 101.226.4.6 took 462.46 ms
DNS resolution for www.sohu.com at 180.76.76.76 took 469.42 ms
DNS resolution for www.sohu.com at 114.114.114.114 took 469.48 ms
DNS resolution for www.sohu.com at 8.8.8.8 took 490.74 ms
Enter a domain: www.google.com
DNS resolution for www.google.com at 223.6.6.6 took 0.50 ms
DNS resolution for www.google.com at 180.76.76.76 took 0.50 ms
DNS resolution for www.google.com at 101.226.4.6 took 0.50 ms
DNS resolution for www.google.com at 123.125.81.6 took 0.50 ms
...
...
...
Golang代码
package main
import (
"bufio"
"context"
"fmt"
"net"
"os"
"sort"
"time"
)
var dnsServers = []string{
"114.114.114.114",
"119.29.29.29",
"223.5.5.5",
"223.6.6.6",
"180.76.76.76",
"101.226.4.6",
"123.125.81.6",
"101.226.4.6",
"101.226.4.6",
"112.124.47.27",
"114.215.126.16",
"8.8.8.8",
"8.8.4.4",
**自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。**
**深知大多数Linux运维工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!**
**因此收集整理了一份《2024年Linux运维全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。**
![img](https://img-blog.csdnimg.cn/img_convert/bab713484f4eefcb1c1f03365f03b79a.png)
![img](https://img-blog.csdnimg.cn/img_convert/45b83c8cdaa6ff1bc4b06dc4982408d1.png)
![img](https://img-blog.csdnimg.cn/img_convert/696ba22a4215cc0a239a1d97c10989bf.png)
![img](https://img-blog.csdnimg.cn/img_convert/25c97f215ca7ac6bcc14a2a5dbc0f70c.png)
![img](https://img-blog.csdnimg.cn/img_convert/62eb8d2cf8710fd7ff2b7cc787c4d8ea.png)
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Linux运维知识点,真正体系化!**
**由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新**
**如果你觉得这些内容对你有帮助,可以添加VX:vip1024b (备注Linux运维获取)**
![img](https://img-blog.csdnimg.cn/img_convert/473e4d2dddab6cbc78e9f91ec2dffd59.jpeg)
![](https://img-blog.csdnimg.cn/img_convert/9a8cb5f8c0ec69e6499adead0da6e95b.png)
最全的Linux教程,Linux从入门到精通
======================
1. **linux从入门到精通(第2版)**
2. **Linux系统移植**
3. **Linux驱动开发入门与实战**
4. **LINUX 系统移植 第2版**
5. **Linux开源网络全栈详解 从DPDK到OpenFlow**
![华为18级工程师呕心沥血撰写3000页Linux学习笔记教程](https://img-blog.csdnimg.cn/img_convert/59742364bb1338737fe2d315a9e2ec54.png)
第一份《Linux从入门到精通》466页
====================
内容简介
====
本书是获得了很多读者好评的Linux经典畅销书**《Linux从入门到精通》的第2版**。本书第1版出版后曾经多次印刷,并被51CTO读书频道评为“最受读者喜爱的原创IT技术图书奖”。本书第﹖版以最新的Ubuntu 12.04为版本,循序渐进地向读者介绍了Linux 的基础应用、系统管理、网络应用、娱乐和办公、程序开发、服务器配置、系统安全等。本书附带1张光盘,内容为本书配套多媒体教学视频。另外,本书还为读者提供了大量的Linux学习资料和Ubuntu安装镜像文件,供读者免费下载。
![华为18级工程师呕心沥血撰写3000页Linux学习笔记教程](https://img-blog.csdnimg.cn/img_convert/9d4aefb6a92edea27b825e59aa1f2c54.png)
**本书适合广大Linux初中级用户、开源软件爱好者和大专院校的学生阅读,同时也非常适合准备从事Linux平台开发的各类人员。**
> 需要《Linux入门到精通》、《linux系统移植》、《Linux驱动开发入门实战》、《Linux开源网络全栈》电子书籍及教程的工程师朋友们劳烦您转发+评论
[**一个人可以走的很快,但一群人才能走的更远。如果你从事以下工作或对以下感兴趣,欢迎戳这里加入程序员的圈子,让我们一起学习成长!**](https://bbs.csdn.net/forums/4304bb5a486d4c3ab8389e65ecb71ac0)
**AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算**
人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算**