Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Randomly select an available IP address for --source-address (was: ipv6 selection) #9601
Comments
|
It chooses "the best match" IPv6 address on your device, which depends on your routing table. |
|
I asked this because my ipv4 got blocked by YouTube for sending too many requests. So now I don't want it to use just 1 IP for downloading. If it chose a random IP out of the 256 IP's, would have been great. what do you exactly mean by best match. Could the best match keep changing each time it downloads? Thanks! |
|
is there a way to know which ip is using ? cant see the used ip in the verbose mode |
See https://en.wikipedia.org/wiki/Routing_table.
In general no. |
Add And by the way, there are several "too many requests" reports and others' solution may help: #5138 and this FAQ entry |
|
I really appreciate all your help. I've already read that post. I just have one last small question. So what if the best match IP gets blocked by YouTube for sending too many requests. Will it move to another IP from the range or just stop there? Thanks :) |
|
It will just get blocked. youtube-dl is not intelligent enough to know the next unblocked IP :) |
|
Can someone here help me change the code of youtube-dl so that it chooses a random IP each time from my ipv6 range instead of just using the best one. I could pay for it. |
|
FYI: you can use |
|
Yes that's what i'm talking about. If some here could help me do that. |
|
Here's an issue: usually YouTube blocks a subnet (an IP range) rather than a single IP, so random selection may not be useful. |
|
what i suggest you guys is to rather connect it to a vpn or proxy to download the same, whatever you do your actual ip broadcasted will be that of the ISP which will not change. You might even get a warning to use your bandwidth fairly. Just report youtube that someone else on your network misused it and you are not involved . selecting random ipv6 will also be a security issue and misuse of the entire network. My suggestion wait as youtube will white list you soon (unless it thinks it to be a ddos attack) , and use any proxy or vpn for a while |
|
What I was thinking was. Let's say I'm sending 10K requests a day. If it chose the best IP then that IP is sending 10K requests and will get blocked super quick. But if it chose a random IP, then 10K requests get divided by 256 that is 39 request per IP. Hence it might not get blocked. So that is why I think this random selection will be a good feature. |
|
I guess YouTube (and possible many other websites) counts requests by subnets rather than individual IPs, as changing IP is so easy. The hypothesis is easy to test: once an IP is blocked, change to another IP with |
|
--source-address will work for ipv6? |
|
Yes. In fact |
|
Alright then. Thanks a lot for your help. Highly Appreciated! |
|
Yan can we talk privately? |
|
You can drop me an email. |
|
Hi Yan, I just sent you an email with this subject: Randomly select an available IP address for --source-address Please check. Thanks! |
I see there is an option --force-ipv6 to use ipv6, does it choose a random ipv6 ip from my range ?
Thanks!