Skip to content

Conversation

@HustCoderHu
Copy link

#304

  • 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

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Per-Authentication Proxy Configuration: Introduced a use_global_proxy field to the Auth struct and related authentication files, allowing users to specify proxy usage on a per-authentication basis rather than globally.
  • User Prompt for Proxy Preference: During login flows, users are now prompted to decide if they want to use the global proxy from config.yaml for the specific authentication being set up.
  • Provider-Specific Defaults: Default use_global_proxy settings are applied based on the authentication provider; for instance, it defaults to false for iFlow and Qwen, and true for other providers.
  • Backward Compatibility: Existing authentication files will default to use_global_proxy: true when loaded, ensuring that current configurations continue to function as expected without disruption.
  • GlobalProxySetter Interface: A new interface GlobalProxySetter has been introduced, which allows token storage objects to dynamically update their use_global_proxy value after initial creation.
  • Updated Proxy Selection Logic: The runtime proxy resolution logic has been enhanced to respect the new use_global_proxy flag, ensuring that the global proxy is only applied if explicitly enabled for a given authentication.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

@HustCoderHu HustCoderHu force-pushed the feature/ask_store_use_global_proxy_in_auth_file branch from fee8f61 to 1112ef1 Compare December 13, 2025 19:58
- 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]>
@HustCoderHu HustCoderHu force-pushed the feature/ask_store_use_global_proxy_in_auth_file branch from 1112ef1 to 279541a Compare December 15, 2025 05:06
@HustCoderHu
Copy link
Author

@luispater

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