NO_PROXY implementation is incomplete
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- javascript
- Ambito
- networking
Direzione di ricerca
Inizia da shouldProxy in lib/resolve-config.js intorno alle righe collegate, poi leggi la discussione di GitLab su NO_PROXY e il riferimento a proxy-from-env. La correzione è completa quando l’esempio di sottodominio e gli altri casi di NO_PROXY descritti nell’issue bypassano correttamente il proxy, con il comportamento rilevante coperto dai test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- JavaScript
- Stelle
- 343
- Fork
- 90
- Merge medio
- 1g 54m
- PR unite (30g)
- 2
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 semantic-release/gitlab
-
`useJobToken` verifyConditions omits proxy, so `got` bypasses `HTTPS_PROXY`Forse già presa @ar7bd l’ha presa 10 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
semantic-release/gitlab#1032 ·
-
bug feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
semantic-release/gitlab#891 · 28 commenti · 15 reazioni ·
-
feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
semantic-release/gitlab#857 · 1 reazione ·
-
Autodetect components projectForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertafeature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
semantic-release/gitlab#851 ·
-
Support releasing GitLab CI componentsForse di nuovo libera @fgreinacher l’ha presa 601 giorni fa e non c’è nessuna pull request aperta. Apertafeature
semantic-release/gitlab#822 · 1 commento · 3 reazioni · 1 assegnatario ·
Tutte le issue di semantic-release/gitlab
Issue simili
-
`yarn vitest:update` (documented) throws locally; local Cypress scripts target an unserved portAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
rescript-lang/rescript-lang.org#1415 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Deepak3699/Ai_Mentor#244 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
antithesishq/bombadil#361 ·
I maintainer di solito rispondono entro 1 giorno
-
ungroomed
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dequelabs/axe-core#5455 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
DietrichGebert/ponytail#1072 ·
I maintainer di solito rispondono entro 3 giorni