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

Features/change warp to tor #28

Merged
merged 19 commits into from
Dec 8, 2024
Merged

Conversation

ryanbekhen
Copy link
Owner

No description provided.

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.
@ryanbekhen ryanbekhen self-assigned this Dec 7, 2024
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.
@ryanbekhen ryanbekhen merged commit 3f0bac5 into master Dec 8, 2024
4 checks passed
@ryanbekhen ryanbekhen deleted the features/change-warp-to-tor branch December 8, 2024 00:42
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