Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

教育网ipv6连接Google的香港、台北、新加坡、韩国、东京都是经过香港的HKIX节点进行交换的。可以用下面这个例子来测试一下

import requests
url_params = {'name':'www.google.com','type':'aaaa','edns_client_subnet':'175.45.20.138'}
url='https://dns.google.com/resolve'
# url='https://9.9.9.9/dns-query'
r = requests.get(url,params = url_params).json()
print(r)

返回的结果(175.45.20.138是一个香港ip):

{'Status': 0, 'TC': False, 'RD': True, 'RA': True, 'AD': False, 'CD': False, 
'Question': [{'name': 'www.google.com.', 'type': 28}], 
'Answer': [{'name': 'www.google.com.', 'type': 28, 'TTL': 299, 'data': '2404:6800:4005:807::2004'}],
'Additional': [], 'edns_client_subnet': '175.45.20.138/20',
'Comment': 'Response from 2001:4860:4802:36::a.'}

在CMD里tracert2404:6800:4005:807::2004一下:

 8    17 ms    17 ms    17 ms  cernet2.net [2001:252:0:100::2]
 9    55 ms     *       55 ms  cernet2.net [2001:252:0:103::2]
 10    57 ms    57 ms    57 ms  google2-lacp-100g.hkix.net [2001:7fa:0:1::ca28:a10a]
 11    58 ms    58 ms    58 ms  2001:4860:0:e04::1
 12    58 ms    58 ms    57 ms  2001:4860:0:1::1d93
 13    57 ms    57 ms    57 ms  hkg07s23-in-x04.1e100.net [2404:6800:4005:807::2004]

目的当然是能够最低程度的fq啦。ipv6是一种成本最低而且速度较快的fq方案。虽然基本只能用Google全家桶。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.