Code Monkey home page Code Monkey logo

Comments (2)

BeiyanYunyi avatar BeiyanYunyi commented on June 23, 2024
  1. 你指的是用 TXT 记录吗?那会是一个好想法。A 或者 AAAA 记录这样的方式没什么实用性,或者说它们的实用性跟 TXT 一样:你不能通过将 A 记录设定到 cloudflare 节点的方式,让你这个域名拥有 cloudflare 的加速(因为你需要在 cloudflare 那里设置源站 ip)。这一点我可能表达得比较晦涩。这个项目不会考虑加入各大 dns 提供商的 api,而是会考虑将结果以一个机器可读的格式打印到标准输出,让用户用其它程序读取与更新 DNS 记录,这样更符合 KISS (keep it simple and stupid,只做一件事并且做到最好)原则。
  2. CloudflareSpeedTest-Rust 测试 ip ping 值的原理并非“一次性 ping 所有 ip”,而是将这些 ip 分成许多组,每组 4096 个。这些组之间是串行的,只在组内部是并行的。将值取为 4096,是因为我发现当这个值更大时,测试结果会失去其准确性:从操作系统到网卡,有很多瓶颈限制着最大并发连接数。测试 ping 值以后是真实延迟测试和下载速度测试,这两个测试的“每组 ip 数”分别是 10 和 1。
  3. 这个有意思,我慢慢做。不过值得注意的是,在我实际测试结果而言,测试出的 ip“有效期”都不是很长,平均在两三天后就会变得比较慢。不过,泛播技术本就会让结果这样变化。

from cloudflarespeedtest-rust.

aa51513 avatar aa51513 commented on June 23, 2024
  1. 你指的是用 TXT 记录吗?那会是一个好想法。A 或者 AAAA 记录这样的方式没什么实用性,或者说它们的实用性跟 TXT 一样:你不能通过将 A 记录设定到 cloudflare 节点的方式,让你这个域名拥有 cloudflare 的加速(因为你需要在 cloudflare 那里设置源站 ip)。这一点我可能表达得比较晦涩。这个项目不会考虑加入各大 dns 提供商的 api,而是会考虑将结果以一个机器可读的格式打印到标准输出,让用户用其它程序读取与更新 DNS 记录,这样更符合 KISS (keep it simple and stupid,只做一件事并且做到最好)原则。
  2. CloudflareSpeedTest-Rust 测试 ip ping 值的原理并非“一次性 ping 所有 ip”,而是将这些 ip 分成许多组,每组 4096 个。这些组之间是串行的,只在组内部是并行的。将值取为 4096,是因为我发现当这个值更大时,测试结果会失去其准确性:从操作系统到网卡,有很多瓶颈限制着最大并发连接数。测试 ping 值以后是真实延迟测试和下载速度测试,这两个测试的“每组 ip 数”分别是 10 和 1。
  3. 这个有意思,我慢慢做。不过值得注意的是,在我实际测试结果而言,测试出的 ip“有效期”都不是很长,平均在两三天后就会变得比较慢。不过,泛播技术本就会让结果这样变化。

Thank you for your reply
感谢您的回复

Regarding the first point, I mean self-built DNS server, which can force the dns resolution results of domain names that belong to me, or even domain names that do not belong to me but are using cloudflare CDN, to the preferred IP address, so as to achieve accelerated network access. The target, what is modified here is the A record or AAAA record;
关于第一点,我的意思是自建DNS服务器,可以将属于我自己的域名乃至不属于我但正在使用cloudflare CDN的域名的dns解析结果强制指向优选后的IP地址,以达到网络加速访问的目标,这里修改的就是A记录或者AAAA记录;

Regarding the second point, I want to talk about the issue of rounds. For example, when I input the round, I see the prompt "0 ≤ x ≤ 462", if I enter "1", then only 4096 IP addresses will be tested , which is obviously not enough.
关于第二点,我是想说轮次的问题,比如我在输入轮次的时候,看到提示“0 ≤ x ≤ 462”,如果我输入“1”,那么就只会测试4096个IP地址,这显然是不够的。
Because when luck is not good enough, these 4096 IPs may be very slow, and even the fastest IP among them is not as good as the IP resolved by normal DNS.
因为运气不够好的时候,这4096个IP可能会都很慢,甚至他们中最快的IP都不如正常DNS解析出来的IP。
That's why I propose that after each round of 4096 screening is completed, compare the fastest IP with the fastest IP in the previous round, and take the faster of the two as the current optimal solution;
所以我才提议,每一轮4096筛选完成后,都将其中最快的IP和上一轮最快的IP进行比较,将二者中较快的作为当前最优解;

Regarding the third point, a mechanism can be set up, for example, a full address scan is performed every 96 hours, and in the middle time, only the IPs that can be connected in the results of the previous full scan are scanned to deal with the problem of IP drift.
关于第三点,可以设置一种机制,比如每96小时进行一次全地址扫描,在中间的时间,就只扫描上一次全扫描结果中能连接的IP,来应对IP漂移的问题

from cloudflarespeedtest-rust.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.