原理
其实DNS流媒体解锁的原理说白了就是DNS劫持+反向代理。假设你有2台VPS,一台VPS1能解锁Netflix(或其他流媒体),另一台VPS2不能解锁Netflix。
DNS流媒体的原理就是:
将VPS2的DNS指向到VPS1的DNS服务器上
VPS1收到一般的域名请求会正常返回结果,但是收到Netflix、HBO、HULU等流媒体域名的请求时就会直接返回VPS1的IP,VPS2收到这个IP后便会误以为VPS1就是Netflix的服务器并与它建立连接,这时VPS1会将VPS2的流量代理到真正的Netflix的服务器,从而实现VPS2的Netflix解锁。
所以,如果你使用DNS解锁流媒体,那么观看Netflix时会同时消耗VPS1和VPS2的流量。
已有部署解锁dns后。
解锁claw
原解锁情况:
原dns内容:
cat /etc/resolv.conf
# This is /run/systemd/resolve/resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 100.100.2.136
nameserver 100.100.2.138
search .
修改dns:
echo -e "nameserver 4.4.4.4" > /etc/resolv.conf #将4.4.4.4修改为dns解锁IP
chattr +i /etc/resolv.conf # 锁定不让修改
锁定报错
chattr: Operation not supported while reading flags on /etc/resolv.conf
可以先备份,生成新的conf
mv /etc/resolv.conf /etc/resolv.conf.link
vi /etc/resolv.conf # 写入内容保存退出
chattr +i /etc/resolv.conf
新解锁情况:
全解锁!
后记
重点还是部署解锁的dns ip。