`URI::Generic#find_proxy` performs blocking DNS lookup before proxy selection
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- ruby
- Ambito
- networking
Direzione di ricerca
Segui Net::HTTP#proxy_uri fino a URI::Generic#find_proxy, concentrandoti su dove viene eseguito IPSocket.getaddress rispetto alla selezione di proxy e no_proxy. Riproduci la ricerca bloccante in un ambiente in cui la destinazione viene risolta solo tramite il proxy, quindi verifica che la selezione del proxy non richieda più prima una ricerca DNS diretta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Net::HTTP#proxy_uri calls URI::Generic#find_proxy, which in turn calls IPSocket.getaddress on the destination hostname before deciding whether to route the request through the configured proxy. For some air-gapped deployments where hosts can only resolve public hostnames through the proxy (instead of e.g. via /etc/resolv.conf), the DNS lookup stalls for the OS DNS timeout (often 30+ seconds) when trying to perform any request via Net::Http.
We're considering a workaround for our Rails application at https://gitlab.com/gitlab-org/gitlab/-/merge_requests/245458. As we've noted before in https://about.gitlab.com/blog/we-need-to-talk-no-proxy/, wether no_proxy is checked before or after performing DNS lookups is inconsistent across languages and libraries, but as far as we can tell Net::HTTP is the outlier, whereas all other tools we checked did not perform a DNS lookup before checking against no_proxy (see specifically https://about.gitlab.com/blog/we-need-to-talk-no-proxy/#no_proxy-format. Note that Go is also listed there as resolving IP addresses, but it appears it does not perform DNS lookups. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/245458#note_3625951439).
- Lingua principale
- Ruby
- Stelle
- 148
- Fork
- 95
- Merge medio
- 10h 54m
- PR unite (30g)
- 4
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ruby/net-http
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
bug documentation
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di ruby/net-http
Issue simili
-
user-reported
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Kong/developer.konghq.com#7316 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
TheOdinProject/curriculum#31408 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
CI: json 3.0.2 removed `quirks_mode`, breaking ActiveSupport's JSON encoder on every test job Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
bensheldon/good_job#1816 · 5 commenti ·