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

Remove hardcoded configuration within the SS example #21

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

erikziyunchi
Copy link
Member

This PR removes the previous hardcoded configurations in the ShadowSocks example, and add the generic way of setting it up.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

PR Type: Enhancement

PR Summary: The pull request introduces a more flexible configuration setup for the ShadowSocks example by removing hardcoded values and replacing them with a generic configuration structure. It adds a new SSConfig struct that includes fields for remote and local addresses, ports, password, and a bypass flag. The Connection struct is now generic to accommodate different configuration types, and the code has been updated to use the new configuration structure.

Decision: Comment

📝 Type: 'Enhancement' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
✅ Small diff: the diff is small enough to approve with confidence.
No details provided.

General suggestions:

  • Ensure that the new configuration structure is fully integrated and used consistently throughout the codebase.
  • Verify that the removal of hardcoded values does not affect any existing functionality and that all necessary configurations are now properly sourced from the new structure.
  • Consider the implications of cloning server address and encryption key on performance and refactor if necessary to avoid unnecessary cloning.
  • Review the new configuration fields to ensure they cover all necessary use cases and that they are properly documented.

Your trial expires on January 15, 2024. Please email [email protected] to continue using Sourcery ✨

Did you find the review useful? React with a 👍 or 👎 to each comment

@erikziyunchi erikziyunchi self-assigned this Jan 7, 2024
Copy link
Contributor

@gaukas gaukas left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for updating.

@erikziyunchi erikziyunchi merged commit c32920b into main Jan 9, 2024
5 checks passed
@erikziyunchi erikziyunchi deleted the remove-hardcoding-ss-example branch January 9, 2024 02:36
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.

2 participants