Github项目地址:
https://github.com/acacia233/Project-WARP-Unlock
介绍:
自动轮换warpIP解锁流媒体,可设置检测间隔,换ip换到全解锁为止;
支持内核5.6(wireguard集成内核以上版本);
工作原理:
- 安装ipset+dnsmasq+wireguard
- 禁用wireguard的自动路由
- 将vps的解析交由dnsmasq处理,为了将解析结果自动放入ipset
- 使用iptables为ipset中的ip打上mark,再让这些ip走特定的路由表
- 特定的路由表中仅存在一条使用wireguard的默认路由
流媒体分流,其他不走,由于会遇到很久换不到一个ip的倒霉情况,对cpu要求突发有点高,
(点名批评aws lightsail离谱的性能限制
此项目只有几十颗star,别被mjj看到给warp撸坏了
DD os:(debian10)
wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh
##default passwd:Pwd@Linux
passwd root
apt -y install sudo wget curl vim dnsmasq
systemctl stop systemd-resolved
systemctl --now disable resolvconf
systemctl --now disable systemd-resolved
systemctl enable dnsmasq
systemctl status dnsmasq
apt -y update;apt -y upgrade
wget -N --no-check-certificate "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
##kernel >5.6 is ok
sudo sh -c "echo 'deb http://deb.debian.org/debian buster-backports main contrib non-free' > /etc/apt/sources.list.d/buster-backports.list"
apt update;apt -y install wireguard
curl -sL https://raw.githubusercontent.com/acacia233/Project-WARP-Unlock/main/run.sh | bash
vim /etc/dnsmasq.d/warp.conf
replace:(tw location)
----------------------------
server=1.1.1.1
server=1.0.0.1
# ----- WARP ----- #
# > Youtube Premium
server=/googlevideo.com/1.1.1.1
server=/youtube.com/1.1.1.1
server=/youtubei.googleapis.com/1.1.1.1
server=/fonts.googleapis.com/1.1.1.1
server=/yt3.ggpht.com/1.1.1.1
server=/gstatic.com/1.1.1.1
ipset=/google.com/warp
ipset=/googlevideo.com/warp
ipset=/youtube.com/warp
ipset=/youtubei.googleapis.com/warp
ipset=/fonts.googleapis.com/warp
ipset=/yt3.ggpht.com/warp
# > 4GTV
ipset=/4gtv.tv/warp
ipset=/4gtvfreepc-cds.cdn.hinet.net/warp
ipset=/4gtvfreepcvod-cds.cdn.hinet.net/warp
ipset=/4gtvpc-cds.cdn.hinet.net/warp
ipset=/4gtvpcvod-cds.cdn.hinet.net/warp
# > Prime Video
ipset=/aiv-cdn.net/warp
ipset=/aiv-cdn.net.c.footprint.net/warp
ipset=/aiv-delivery.net/warp
ipset=/amazonvideo.com/warp
ipset=/atv-ext.amazon.com/warp
ipset=/atv-ps.amazon.com/warp
ipset=/media-amazon.com/warp
ipset=/primevideo.com/warp
ipset=/d25xi40x97liuc.cloudfront.net/warp
ipset=/dmqdd6hw24ucf.cloudfront.net/warp
# > Disney+
ipset=/bamgrid.com/warp
ipset=/disney-plus.net/warp
ipset=/disneyplus.com/warp
ipset=/dssott.com/warp
ipset=/disneynow.com/warp
ipset=/disneystreaming.com/warp
ipset=/cdn.registerdisney.go.com/warp
----------------------------
systemctl restart dnsmasq
systemctl status dnsmasq
vim /etc/resolv.conf
nameserver 127.0.0.1
chattr +i /etc/resolv.conf
bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)