httpx ignores no_proxy and https_proxy in docker-compose

オープン
#758 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
docker-compose, python
領域
networking

調査の方向性

まず、Docker Compose で http_proxy、https_proxy、no_proxy を使ってプロキシの動作を再現し、trust_env=False の AsyncClient と比較します。リクエスト中に環境がどのように解釈されるかを追跡します。no_proxy によって一致する宛先が設定済みのプロキシをバイパスすれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Originally opened by @lsch0lz on 2023-05-19 09:02:03 in encode/httpx

When I use httpx inside a Docker container that was built with the http_proxy and http_proxy environment variables, I cannot ignore these variables when starting the container via docker-compose.
I set the no_proxy variable when starting the container so that the container should ignore any proxies it was built with.
httpx still uses those proxies. To solve this I had to set trust_env=False in my AsyncClient.

Is this expected behaviour? I thought that disabling the proxies in the docker-compose file would automatically tell httpx to ignore them when making a request.

主要言語
Python
スター
1.6k
フォーク
103
平均マージ
1日 19時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pydantic/httpx2 のほかの issue

pydantic/httpx2 の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。