-
-
Notifications
You must be signed in to change notification settings - Fork 630
feat(auth): add per-auth use_global_proxy configuration #514
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
base: main
Are you sure you want to change the base?
feat(auth): add per-auth use_global_proxy configuration #514
Conversation
Summary of ChangesHello @HustCoderHu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant enhancement to the authentication system by providing granular control over proxy usage. It allows users to configure whether a global proxy should be applied to individual authentication methods, thereby improving flexibility and user experience. The changes ensure backward compatibility for existing configurations and streamline the proxy selection process during runtime, making proxy management more intuitive and adaptable. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a per-authentication use_global_proxy setting, which is a great feature for giving users more granular control over their proxy configurations. The implementation is well-thought-out, covering backward compatibility for existing auth files and centralizing the new logic where possible. The use of the GlobalProxySetter interface is a clean approach to update token storage. My review includes a couple of suggestions for the iflow_cookie.go command to improve code clarity and reduce duplication.
fee8f61 to
1112ef1
Compare
- Add use_global_proxy field to Auth struct and auth files - Prompt users for proxy preference during login flows - Use provider-specific defaults (iFlow/Qwen: false, others: true) - Maintain backward compatibility by defaulting to true for existing files - Implement GlobalProxySetter interface for token storage - Update proxy selection logic to respect use_global_proxy flag This allows users to control proxy usage on a per-auth basis while maintaining backward compatibility with existing auth files. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: HustCoderHu <[email protected]>
1112ef1 to
279541a
Compare
#304
This allows users to control proxy usage on a per-auth basis while maintaining backward compatibility with existing auth files.
Generated with Claude Code