Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support execution behind a corporate proxy #446

Closed
nulltoken opened this issue Aug 13, 2019 · 9 comments · Fixed by #533
Closed

Support execution behind a corporate proxy #446

nulltoken opened this issue Aug 13, 2019 · 9 comments · Fixed by #533
Labels

Comments

@nulltoken
Copy link
Contributor

User story.
As a user working behind a corporate proxy, I can configure spectral, so that I can run it without errors when ref$ points to internet based urls.

Is your feature request related to a problem?
In #245, @marbemac made it possible to resolve http based remote references.

return (await fetch(String(ref))).text();

However, for those of us working behind a corporate proxy, well... things do tend to not work.

 842:13    error  [invalid-ref] FetchError: request to https://REDACTED/doco.yaml failed, reason: connect ETIMEDOUT XX.XX.XX.XX:443

Describe the solution you'd like

  • Ideally, supporting http_proxy and https_proxy would just be awesome 🎉
  • An optional argument to the cli would also fit my request.

Additional context
node-fetch/node-fetch#195

@marbemac
Copy link
Contributor

Hmm, simplest is probably using something like https://github.com/gajus/global-agent when in node context. Would require bumping minimum node version up to v10 since they rely on language features (versus monkey patching etc), but that's probably alright since node 8 is EOL in December anyways. Thoughts @P0lip @philsturgeon?

@philsturgeon
Copy link
Contributor

@marbemac great idea, let's do it this way. Seeing as node-fetch is based on requests internally this should work just fine.

@nulltoken do you have a workaround for now? We can raise node requirements to v10 for v5.0 but doing it for v4.x might be a bit cheeky. If we find a few more breaking changes we'd like to do (removing addRules and addFunctions for example) then it'd be nice to do it later on, but I also don't corporate firewall users to be blocked for three months.

@nulltoken
Copy link
Contributor Author

@philsturgeon Well, my current workaround is tethering through my mobile... which isn't the richest experience ;-)

Would you know the forecast ETA for 5.0?
Any chance to get a beta channel release?

For what it's worth, I'd be a taker for a -dev channel release released whenever a PR is merged.

@philsturgeon
Copy link
Contributor

@nulltoken yeah I'll just put together an ad-hoc v5 branch and start putting together breaking changes in there, and we'll merge it to develop when its time to get serious about it. What install channel are you using? Docker? NPM?

@nulltoken
Copy link
Contributor Author

What install channel are you using? Docker? NPM?

Npm

I'll just put together an ad-hoc v5 branch

❤️

@philsturgeon philsturgeon added this to the Sept '19 milestone Aug 23, 2019
@philsturgeon
Copy link
Contributor

Sorry for the delay here, we were cranking on v4.1.0. We’ll take this on as part of the sprint starting today, and develop will become the v5 branch.

@nulltoken
Copy link
Contributor Author

@philsturgeon So glad this got merged. Do you foresee a release of this as part of the v4 branch soon?

@philsturgeon
Copy link
Contributor

philsturgeon commented Sep 18, 2019 via email

@P0lip
Copy link
Contributor

P0lip commented Sep 20, 2019

@nulltoken
v4.2.0-beta2 containing this proxy feature has just been released.

@P0lip P0lip removed this from the Sept '19 milestone May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants