Original link: https://dosk.win/2022/11/04/jie-jue-chrome-yuan-sheng-gu-ge-fan-yi-gong-nai-de-yi-ge-si-lu-3 -3/
continue from above
Solution: After a wave of testing, only
DoH
is more reliable. After searching around, I found HUAWEI CLOUD functions, which can be used for free.
-
Register HUAWEI CLOUD, create a new cloud function, the default
Nodejs
is fine, the trigger isHTTP
, the name is very important, it must be calleddns-query
because I am too lazy to change the configuration -
Run
dnsmasq
inside and configure your hard-coded parsing records. Bothtranslate.google.com
andtranslate.googleapis.com
are required. In the previous article, only the former was demonstrated, and it should be added accordingly. -
Start
doh-proxy
proxydnsmasq
to resolve -
HUAWEI CLOUD, add a trigger, close the verification (anyone can access), then copy the address to
Chrome
‘s settings(Privacy and security -> Security -> Use secure DNS)
, selectCustom
and fill in the address -
Turn on the translation function and use it happily (you can verify whether the resolution is successful in
chrome://net-internals/?#dns
)
code
dnsmasq
configuration, change the address to your own
port=5353 domain-needed strict-order cache-size=1024 address=/translate.google.com/123.123.123.123 address=/translate.googleapis.com/123.123.123.123
bootstrap
is the startup file code of Huawei Cloud functions
#!/bin/bash ## current dir cd $RUNTIME_CODE_ROOT ## start dnsmasq ./dnsmasq --conf-file=./dns.txt ## start doh-proxy ./doh-proxy --listen-address 0.0.0.0:8000 --server-address 127.0.0.1:5353
The rest of the binary files, I put them in the network disk, you can upload them directly on HUAWEI CLOUD, and then modify the address online, etc.
This article is reprinted from: https://dosk.win/2022/11/04/jie-jue-chrome-yuan-sheng-gu-ge-fan-yi-gong-nai-de-yi-ge-si-lu-3 -3/
This site is for inclusion only, and the copyright belongs to the original author.