- Notifications
You must be signed in to change notification settings - Fork11.2k
Ipv6 support for proxy#7090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecovbot commentedOct 13, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #7090 +/- ##==========================================+ Coverage 91.10% 91.44% +0.34%========================================== Files 165 165 Lines 12836 12694 -142 Branches 1661 1626 -35 ==========================================- Hits 11694 11608 -86+ Misses 859 811 -48+ Partials 283 275 -8
|
Signed-off-by: Vasiliy Kiryanov <1378948+vasiliyk@users.noreply.github.com>
Signed-off-by: Vasiliy Kiryanov <1378948+vasiliyk@users.noreply.github.com>
Signed-off-by: Vasiliy Kiryanov <1378948+vasiliyk@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
wRAR commentedOct 28, 2025
The test passes without the download handler changes so we need a better one, but I'm not sure whether is it possible. It looks like v6 proxies are indeed (as the issue discussion says) supported in master when used with an IP so we need to use a hostname? |
Uh oh!
There was an error while loading.Please reload this page.
__init__ from IP specific client end-points moved to TunnelingMixinSigned-off-by: Vasiliy Kiryanov <vasiliy.kiryanov@gmail.com>
Signed-off-by: Vasiliy Kiryanov <vasiliy.kiryanov@gmail.com>
Signed-off-by: Vasiliy Kiryanov <vasiliy.kiryanov@gmail.com>
vasiliyk commentedOct 28, 2025
We can show that the correct def_make_agent(proxy_uri:bytes):agent=ScrapyProxyAgent(reactor=reactor,proxyURI=proxy_uri)# a minimal endpointFactory expected by _getEndpointagent._endpointFactory=type("EF", (), {"_connectTimeout":5.0,"_bindAddress":None})()returnagentdeftest_hostname_resolves_to_ipv6(monkeypatch):# Simulate DNS resolving the hostname to an IPv6 addressdeffake_getaddrinfo(host,port,*args,**kwargs):return [ (socket.AF_INET6,socket.SOCK_STREAM,socket.IPPROTO_TCP,"", ("::1",0,0,0)) ]monkeypatch.setattr(socket,"getaddrinfo",fake_getaddrinfo)agent=_make_agent(b"http://ipv6-resolves.example:8080")endpoint=agent._getEndpoint(agent._proxyURI)assertisinstance(endpoint,TCP6ClientEndpoint) |
Uh oh!
There was an error while loading.Please reload this page.
PRcloses#6674