Full Support For Environment Proxy (http, https, no_proxy)
Full http_proxy https_proxy, no_proxy suupport:
Support for http_proxy, https_proxyh and no_proxy environment variables implemented. This include reading variables from process environment, comparing request_url with no_proxy cidr's and names, and of course setting and redirecting requests using proxy or corporate proxy services. This does not impact by any means the DHCP and TFTP services - only webapp.
Environments read for comparision:
http_proxy||HTTP_PROXYhttps_proxt||HTTPS_PROXYno_proxy||NO_PROXY
Implemented and/or extended:
- DownloaderHelper.
- Socket fetch.
- Devgetbrowser method.
One method for each approach getProxyAgentFromUrl(). Almost no changes to the code are needed.
This fully resolves: https://github.com/netbootxyz/webapp/issues/66
@antonym @vangorra @thelamer ping. The PR adds support for proxy servers as well as adds changes from docker-netbootxyz that are not reflected here.
Another ping - would be grateful for a review - @antonym @vangorra @thelamer ping
I've changed it as you mentioned. IF you find some time I would be grateful for a review :).
We can then move along and I will introduce a ready Kubernetes / Harvester set of YAML files or we can create Helm chart for this as most of folks probably would love to have it ready to be deployed. I am currently running NetBoot.xyz on a secure harvester cluster behind a corporate proxy and still being able to boot OS from it on most of our subnets after some tuning.
BTW the project if really awesome!
@antonym @vangorra @thelamer ping and review request. @cp-whatcha could you check if this works for you?
Made some changes to the Dockerfile so that it properly reflects the changes in docker-netbootxyz and creates a proper dev container when things are merged in. I'd suggest rebasing this to pull the docker changes out and we can try and look this over and reduce the overall changes. I don't have a proxy set up locally so if you have a good suggested way to validate and test that'd be great as well.
Made some changes to the Dockerfile so that it properly reflects the changes in docker-netbootxyz and creates a proper dev container when things are merged in. I'd suggest rebasing this to pull the docker changes out and we can try and look this over and reduce the overall changes. I don't have a proxy set up locally so if you have a good suggested way to validate and test that'd be great as well.
Hi @antonym ,
I use a web proxy called Squid for testing:
docker pull sameersbn/squid:3.5.27-2
docker run --name squid -d --restart=always
--publish 3128:3128
--volume /srv/docker/squid/cache:/var/spool/squid
sameersbn/squid:3.5.27-2
When it's running I set my browser web proxy to point to the test proxy.
I hope that's helpful.
Best,
Joe
@antonym please feel free to edit and/or merge this PR on your own to the repository. I am against the coding culture where we wait till for 3 months not seen developer (like myself here) make a rebase and click one button. If you find this patch useful merge it in part or fully, don't wait for my moves :) thanks a sorry for late response.