-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add support for socks connection to Git backend #17640
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arthanson
changed the title
DRAFT: Add support for socks connection to Git backend
Add support for socks connection to Git backend
Sep 30, 2024
jeremystretch
requested changes
Sep 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this both with and without authentication, and syncing worked as expected both times. Nice work @arthanson!
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
jeremystretch
approved these changes
Oct 1, 2024
bctiemann
pushed a commit
that referenced
this pull request
Oct 11, 2024
* Add support for socks connection to Git backend * cleanup socks detection * add documentation for installing python_socks * dont need lower() * cleanup * refactor Socks to utilities * fix imports * fix missing comma * Update docs/features/synchronized-data.md Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * review feedback * Update docs/features/synchronized-data.md Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * review changes --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
jeremystretch
added a commit
to alehaa/netbox
that referenced
this pull request
Oct 11, 2024
* Add support for socks connection to Git backend * cleanup socks detection * add documentation for installing python_socks * dont need lower() * cleanup * refactor Socks to utilities * fix imports * fix missing comma * Update docs/features/synchronized-data.md Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * review feedback * Update docs/features/synchronized-data.md Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * review changes --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #17639
Note: will also need to install the python_socks library along with the Dulwich library to use this:
To test locally, start a socks proxy in a docker container. Make a HTTP request and observe it using the proxy:
Specify the local proxy in Netbox configuration.py:
Add a remote GIT datasource and you should see the traffic logs in the terminal. Setup a DataSource in Netbox, I was using the following in the form:
The URL just has a selection of scripts so you can see that it actually syncs the data source. Press the [Sync] button and make sure it actually syncs.
For SOCKs auth scenario it can be setup as follows:
Then in configuration.py: