 如果你喜欢用游管来测试VPS的速度,那你也许就掉坑了,因为不同的googlevideo节点速度都会有差别。有的VPS因为是广播IP所以甚至会连接上遥远距离的节点,所以自选节点看googlevideo,是折腾主义者需要做的事情。 CentOS7系统为例: ```shell yum install dnsmasq -y ``` 编辑/etc/dnsmasq.conf 添加如下 ```shell # 严格按照 resolv-file 文件中的顺序从上到下进行 DNS 解析, 直到第一个成功解析成功为止 strict-order # 监听的 IP 地址 listen-address=127.0.0.1 # 设置缓存大小 cache-size=10240 # 泛域名解析64.233.189.105为自选IP节点 address=/googlevideo.com/64.233.189.105 address=/you马赛克tube.com/64.233.189.105 ``` 修改系统DNS配置,编辑/etc/resolv.conf ```shell nameserver 127.0.0.1 # 一定要放在第一个 nameserver 8.8.8.8 ``` 启动服务 ```shell systemctl enable --now dnsmasq ``` 常用命令 ```shell 查看运行状态:systemctl status dnsmasq 重启:systemctl restart dnsmasq ``` 测试 ```shell [root@ ~]# ping googlevideo.com PING googlevideo.com (64.233.189.105) 56(84) bytes of data. 64 bytes from www.google.com (64.233.189.105): icmp_seq=1 ttl=110 time=27.0 ms ``` treesky 2023-01-26 上一篇: arm机器 脚本收集 下一篇: Linux测试MTU数值并设置 评论已关闭
评论已关闭