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

Full Support For Environment Proxy (http, https, no_proxy) #73

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Mionsz
Copy link

@Mionsz Mionsz commented Aug 10, 2024

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_PROXY
  • https_proxt || HTTPS_PROXY
  • no_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: #66

@Mionsz Mionsz mentioned this pull request Aug 10, 2024
@Mionsz Mionsz force-pushed the master branch 4 times, most recently from b1e06ab to 72e5725 Compare September 24, 2024 06:09
@Fiooodooor
Copy link

@antonym @vangorra @thelamer ping. The PR adds support for proxy servers as well as adds changes from docker-netbootxyz that are not reflected here.

@Mionsz
Copy link
Author

Mionsz commented Oct 7, 2024

Another ping - would be grateful for a review - @antonym @vangorra @thelamer ping

root/start.sh Show resolved Hide resolved
root/etc/supervisor.conf Show resolved Hide resolved
root/etc/supervisor.conf Show resolved Hide resolved
root/defaults/nginx.conf Outdated Show resolved Hide resolved
root/defaults/default Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
app.js Show resolved Hide resolved
app.js Show resolved Hide resolved
Copy link
Contributor

@vangorra vangorra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't comment every place that needs review but the pattern exists throughout the code and is covered in a few of the comments. I'll do a deeper review once we get the initial syntax in order

Dockerfile Outdated Show resolved Hide resolved
app.js Outdated Show resolved Hide resolved
app.js Outdated Show resolved Hide resolved
app.js Outdated Show resolved Hide resolved
Reflecting Dockerfile-netbootxyz changes.
Split the `start.sh` entrypoint file:
- init.sh - prepares environment and directories on first run
- start.sh - entrypoint script that runs supervisord and init.sh

Made basic set of parameters (ports) configurable.
Now the `default` file need to be templated before first run.
Minor fixes due to supervisor failing.
Added proxy settings from environment pass to WebApplication

Signed-off-by: Milosz Linkiewicz <[email protected]>
HTTP and HTTPS proxy agents added.
Now every link connection before cration is checked
against environment variables:
- http_proxy/HTTP_PROXY,
- https_proxy/HTTPS_PROXY,
- no_proxy/NO_PROXY,

It is determined if connection should be routed throug proxy server. This includes:
- DownloaderHelper.
- Socket fetch.
- Devgetbrowser method.

Fix to Readdirp handling after migration to v4.0.0.

Signed-off-by: Milosz Linkiewicz <[email protected]>
Dockerfile code improvements and labeles added.
The improvements include using bash as default shell
for bettter error detection while performing install
and start of container.

Signed-off-by: Milosz Linkiewicz <[email protected]>
@Mionsz
Copy link
Author

Mionsz commented Oct 7, 2024

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!

@Mionsz Mionsz requested a review from vangorra October 7, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP(s) Proxy support
3 participants