cnsilvan / UnblockNeteaseMusic

Revive unavailable songs for Netease Cloud Music (Golang)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

问一下 "通过本机直接查询" 是什么意思啊?

nondanee opened this issue · comments

commented

是说通过 dns 查而不是 httpdns 查吗?

nodejs 版的 music.163.com ip 也不是通过 httpdns 获取的,而是 -f 参数指定的

httpdns 只是用来生成 pac 的,而且 dns 也是查了的
主要为了防止使用 pac 时因为规则缺失而遗漏目标流量

实际代理中 MITM 下会检查请求头 host,TUNNEL 下会检查 sni,就算没有获取过 ip 也能正常工作

你好,这个版本获取的ip是通过dns获取,之前版本未自动修改hosts,所以提示换用golang的用户防止运行前修改过hosts,导致ip获取为本机。忘记修改readme。
目前如果默认启动(hosts模式)是会自动修改本地hosts,不会出现问题。但如果启动模式为非hosts模式,且用户又手动修改过hosts(指定到localhost),则会出现无法使用的问题。
我会修改描述文件,不好意思。感谢你的nodejs版本。

commented

确实是因为改 hosts 这个问题才做了 -f
不过 node 上其实是可以绕过 hosts 查 dns 的,可能 go 也有这样的 api 吧

dns.resolve('music.163.com', 'A', console.log) // hosts 无效
dns.lookup('music.163.com', console.log) // hosts 有效

但是没有使用,还是选择让用户手动输入,因为这个方法在移动端有问题
不用谢