markdown-link-check
markdown-link-check copied to clipboard
Proxy configuration
Hi,
I'd like to use this tool behind a corporate proxy, and I don't get how to configure the proxy, if possible.
I checked internal through link-check
and needle
.
I thought from reading at this issue that would be possible https://github.com/tcort/link-check/issues/29
Looking at needle documentation we would have to pass a proxy
or agent
option for that : https://github.com/tomas/needle#request-options
Currently there does not seem to be an option in order to configure a proxy, or am I missing something ?
same here, it seems not to work behind proxy even with http(s)_proxy variables defined
Hi @tcort, I tried to move this topic upstream for full support in needle itself e.g. including no_proxy
, in https://github.com/tomas/needle/pull/382, as using the standard environment variables is usually the way to go. But that doesn't seem to be picking up - would you still be interested in doing this on the link-check side? It does seem like the older request
library already had full support for this https://github.com/request/request/blob/3c0cddc7c8eb60b470e9519da85896ed7ee0081e/README.md?plain=1#L568-L578
The PR against needle seems to be merged in upstream release 3.1.0 (https://github.com/tomas/needle/commit/8353cdb5163a3e8e610ccc1eaea4e604c5159401).
A corresponding dependency bump would be needed to turn it effective for markdown-link-check.
@fhaftmann you can already bump needle yourself as markdown-link-check
does not pin it to the exact version:
https://github.com/tcort/markdown-link-check/blob/master/package.json#L42
However, the implementation of no_proxy
in that PR only seems to cover exact hosts, but not domains or ports (see discussion in https://github.com/tomas/needle/issues/383), so not sure that'll fix the issue for you entirely.
However, the implementation of no_proxy in that PR only seems to cover exact hosts, but not domains or ports (see discussion in https://github.com/tomas/needle/issues/383), so not sure that'll fix the issue for you entirely.
Confirmed => only way to support http_proxy
/ https_proxy
/ no_proxy
is to use/downgrade markdown-link-check to
3.8.7 😢
I can also confirm. No matter how I set https_proxy
I get only errors 502
and 503
for external URLs. With 3.8.7 there are no problems. Verbose output -v
does not show more information.
IMO the problem is an upstream bug: https://github.com/tomas/needle/issues/406