-
Notifications
You must be signed in to change notification settings - Fork 5
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
Features/change warp to tor #28
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
Added Tor support to nanoproxy, allowing it to anonymize network traffic by integrating with the Tor network. Updated configuration to include options for enabling Tor and specifying the interval for changing Tor identities. Replaced references to Cloudflare WARP in relevant documentation and Docker setup, emphasizing the new Tor capabilities.
Removed the redundant extra_files section from the .goreleaser.yml file to clean up the configuration. This change helps in maintaining an organized and efficient build process.
Added a script to ensure Tor fully bootstraps before starting nanoproxy. Updated Dockerfile-tor and goreleaser to include needed configurations and run processes appropriately.
Replaced the entrypoint script for better orchestration between Tor and nanoproxy services. Added a new script `start-with-tor.sh` to handle the initialization sequence. This change improves the startup logic and ensures smoother service management.
Renamed the start-with-tor.sh script to entrypoint.sh to better reflect its purpose in the Docker setup. Updated references in .goreleaser.yml and Dockerfile-tor to ensure consistent script usage across the build process.
Renamed the copied entrypoint script to match the expected filename in Dockerfile-tor. This ensures consistency and avoids potential script execution issues.
This update adds a command to make entrypoint.sh executable, ensuring it can run as intended. Without this change, permission issues could prevent the script execution inside the container.
Enhanced the Tor bootstrap checking mechanism by optimizing the command sent to the control port. Changed the sleep interval from 1 second to 5 seconds for better efficiency and reduced load.
The DataDirectory setting was removed from the torrc configuration file due to redundancy. This change ensures that only necessary configurations are included, streamlining the setup process in Docker.
Replaced the entrypoint.sh script with supervisord for process management, allowing for better control and monitoring of Tor and nanoproxy. Introduced a new `pkg/tor/identity.go` to handle switching Tor identities. These changes enhance resilience and ensure improved logging and process management.
Removing the 'USER tor' line enables the supervisor to run with default user permissions, which are generally root. This change is necessary for enhancing the compatibility with Docker images and avoids permission issues during runtime.
Implemented a function to check the Tor bootstrap status and integrate it with the identity switching process. This ensures the system waits for Tor network readiness before issuing new identity requests, enhancing reliability.
Updated log messages in identity.go to use English for consistency across the codebase. This change ensures uniformity in logging language, aiding in better collaboration and understanding for all developers.
Replaced the `checkTorBootstrapStatus` function with `requestNewTorIdentity` to streamline the process of switching Tor identities. This change removes unnecessary TCP connections to the Tor control port, reducing complexity and potential points of failure. Also added a nil check for the logger before logging the identity switch message.
Introduce Tor identity management with a new controller and requester mechanism, allowing for identity changes and better connection handling. Implement tests to ensure reliability and correct functionality, enhancing the robustness of the Tor integration within the application.
Refactor the test suite to use a MockDialer, replacing previous SOCKS5 error simulation. This streamlines the testing process and removes dependencies on other modules, making the tests cleaner and more focused.
Updated test cases to use a mock for the SOCKS5 dialer, ensuring more accurate simulation of both success and failure scenarios. This change enhances the reliability of the test suite by ensuring the custom SOCKS5 function is properly tested without impacting other operations.
Added a build constraint to ensure the code is only included in non-test environments. This helps in organizing build configurations and managing dependencies effectively.
Exclude nanoproxy.go from test coverage checks. This change ensures the main package is not tested for coverage, aligning with project guidelines. Removed build constraint from nanoproxy.go for better code clarity.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.