段落1、需求
服务器的IPv4看Netflix,没希望,被Netflix的IP地址库封的死死的,手里有一台服务器,它的IPv6地址是英国的原生IPv6,可以支持观看Netflix
那么,就简单了,我们通过配置让Netflix的流量走到IPv6出口即可
入站的流量通过服务器的IPv4地址进入,出站的Netflix流量通过原生IPv6出站,其余非Netflix流媒体的流量,还是通过IPv4出站
通过 基于sjlleo/netflix-verify,检测VPS服务器IP地址或节点IP是否支持Netflix流媒体 2022-2-28
段落2、部署操作
操作1-3
// 在routing的rules列表中增加Netflix的相关域名,指定它走IPv6的路由 "routing": { "domainStrategy": "IPIfNonMatch", "rules": [ { "type": "field", "domain": [ "netflix.com", "netflix.net", "netflixdnstest1.com", "netflixdnstest2.com", "netflixdnstest3.com", "netflixdnstest4.com", "netflixdnstest5.com", "netflixdnstest6.com", "netflixdnstest7.com", "netflixdnstest8.com", "netflixdnstest9.com", "netflixdnstest10.com", "netflixinvestor.com", "netflixtechblog.com", "nflxext.com", "nflximg.com", "nflximg.net", "nflxsearch.net", "nflxso.net", "nflxvideo.net", "geosite:netflix" ], "outboundTag": "IPv6_OUT" }, { "type": "field", "outboundTag": "IPv4_OUT", "network": "udp,tcp" } ] },
操作2-3
// 在入站的inbounds中增加"sniffing"的参数 "inbounds": [ { "sniffing": { "enabled": true, "destOverride": [ "http", "tls" ] }, "settings": { "clients": [ { "id": "dc0d52a2-c6c3-44e4-85cf-b479f736c378", "alterId": 0 } ] }, "port": 8080, "protocol": "vmess" } ],
操作3-3
// 在outbounds出站中区分开IPv4/IPv6两项内容 "outbounds": [ { "protocol": "freedom", "settings": {}, "tag": "IPv4_OUT" }, { "protocol": "freedom", "settings": { "domainStrategy": "UseIPv6" }, "tag": "IPv6_OUT" }, { "settings": {}, "protocol": "blackhole", "tag": "blocked" } ]
段落9、额外信息
同理,一些主流的支持IPv6的网站,也可以根据这个办法,进行IPv6分流
"geosite:netflix" "geosite:google" "geosite:youtube"
还有一种方式备用,sni+dnsmasq 分流
搭建完后,修改配置/etc/sniproxy.conf,设置ipv6优先,完重启机器
resolver { nameserver 8.8.8.8 nameserver 8.8.4.4 # local dns should be better mode ipv6_first }
Pingback引用通告: 配置基于IPv6优先的Shadowsocks-libev,可供落地解锁流媒体的需求 2022-3-27 | Dasmz