`URI::Generic#find_proxy` performs blocking DNS lookup before proxy selection
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- ruby
- 領域
- networking
調査の方向性
Net::HTTP#proxy_uri から URI::Generic#find_proxy までを追跡し、proxy と no_proxy の選択に対して IPSocket.getaddress がどの時点で実行されるかに注目してください。宛先がプロキシ経由でのみ解決される環境でブロッキングする名前解決を再現し、その後、プロキシの選択で最初に直接 DNS ルックアップを必要としなくなったことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
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).
- 主要言語
- Ruby
- スター
- 148
- フォーク
- 95
- 平均マージ
- 10時間 54分
- マージ済み PR(30日)
- 4
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruby/net-http のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
bug documentation
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
バグ
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
voxpupuli/puppet-epel#186 · コメント 1 件 ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) オープンBug Frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100