NO_PROXY implementation is incomplete
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- javascript
- 領域
- networking
調査の方向性
リンクされた行の周辺にある lib/resolve-config.js の shouldProxy から始め、GitLab の NO_PROXY に関する議論と proxy-from-env のリファレンスを読んでください。この issue で説明されているサブドメインの例およびその他の NO_PROXY のケースがプロキシを正しくバイパスし、関連する動作がテストでカバーされれば、修正は完了です。
索引モデルが issue の本文から書いたものです。
説明
The function shouldProxy was
// Copied from Rob Wu's great proxy-from-env library: https://github.com/Rob--W/proxy-from-env/blob/96d01f8fcfdccfb776735751132930bbf79c4a3a/index.js#L62
Sadly the implementation is incomplete and misses many use cases.
There is a great page at:
https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/
Which gives a good discussion about NO_PROXY and the issues that have arisen from it. Rob Wu's implementation suffers many problems the article discusses.
For example given:
export HTTP_PROXY=something
export HTTPS_PROXY=something
export NO_PROXY=subdomain.domain.com
A gitlab server at gitlab.subdomain.domain.com would not bypass the proxy as the block:
if (!/^[.*]/.test(parsedProxyHostname)) {
// No wildcards, so stop proxying if there is an exact match.
return hostname !== parsedProxyHostname;
}
Would do a comparison:
if(!/^[.*]/.test(subdomain.domain.com)){
return gitlab.subdomain.domain.com !== subdomain.domain.com
}
resulting in a true response and hence the gitlab server being pushed through to the proxy.
Often proxies do not allow access to internal services hence this results in errors occurring in the semantic-release/gitlab plugin:
[12:06:30 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/gitlab"
[12:06:30 AM] [semantic-release] [@semantic-release/gitlab] › ℹ Verify GitLab authentication (https://gitlab.subdomain.domain.com/api/v4)
[12:06:30 AM] [semantic-release] › ✘ Failed step "verifyConditions" of plugin "@semantic-release/gitlab"
[12:06:30 AM] [semantic-release] › ✘ An error occurred while running semantic-release: RequestError: Bad response: 403
This bug report is to request a fix to the shouldProxy method to correctly handle NO_PROXY values which list [sub]domains without wild cards.
It seems the proxy-from-env still has the bug, but with the core code not being maintained for 5 years, and even nodejs commenting that it was incomplete when they implemented NO_PROXY support, the recommendation would be to either update the existing code base or convert the codebase to use an alternative library.
- 主要言語
- JavaScript
- スター
- 342
- フォーク
- 90
- 平均マージ
- 4時間 29分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
semantic-release/gitlab のほかの issue
-
`useJobToken` verifyConditions omits proxy, so `got` bypasses `HTTPS_PROXY`対応中かも @ar7bd が 21 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
semantic-release/gitlab#1032 ·
-
bug feature
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
semantic-release/gitlab#891 · コメント 28 件 · リアクション 15 件 ·
-
feature
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
semantic-release/gitlab#857 · リアクション 1 件 ·
-
Autodetect components project再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンfeature
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
semantic-release/gitlab#851 ·
-
Support releasing GitLab CI components再び着手できるかも @fgreinacher が 612 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンfeature
semantic-release/gitlab#822 · コメント 1 件 · リアクション 3 件 · 担当者 1 名 ·
semantic-release/gitlab の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
maintenance
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
alphagov/accessible-autocomplete#826 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
olahol/react-tagsinput#229 ·
-
[BUG] npm pkg delete removes the first array item for a nonexistent property対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
jonathanong/no-mistakes#2260 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信