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

Created Whitelist Plugin c.f. filter_by_upstream (also fixed latter) #1514

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

nimpo
Copy link

@nimpo nimpo commented Dec 12, 2024

  1. Fixed the Filter By Upstream Plugin so that it compares server-name against the defined/default comma separated filter list of server-names. It was trying instead to match IP address of incoming requesting to the same list of server-names and therefore never matching e.g. the example facebook.com.
  2. Made a copy of that Filter By Upstream Plugin, called it Whitelist Upstream Hosts Plugin, and changed code so that the filter behaves in the opposite way: default deny with only matching server-name requests allowed via proxy.
  3. Updated init.py to allow loading of plugin.
  4. Updated Readme to add info on Plugin.

The reason for this code change was that I wanted a proxy to run on the head node (or associated VM) of an HPC cluster such that a job submitted to the queue, when running on worker nodes with no outbound connection, could set $HTTPS_PROXY to allow singularity to contact the Singularity Hub for required containers to download at runtime. I did not want my proxy to be used as a generic outbound proxy except to pass traffic to Singularity hub and known dependencies at time of writing.

Code was patched on remote HPC which is using an older branch installed via pip. This pull request is against the current development branch, pulled gie pip and git and tested in my local Ubuntu 22.04 environment.

Thank you for your work on proxy.py it has helped work round a singular issue :-)

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.

1 participant