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

Add proxy support for iOS #2362

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

yerkejs
Copy link

@yerkejs yerkejs commented Oct 21, 2024

Connection with issue(s)

Connected to #2244

Testing and Review Notes

  1. Connecting proxy (HTTP or SOCKS) like Charles, Proxyman and etc

To Do

  • double check the original issue to confirm it is fully satisfied
  • add testing notes and screenshots in PR description to help guide reviewers

@pichillilorenzo
Copy link
Owner

This is cool, thanks! However, the API should not contain any "android" or "ios" prefix as this is something that was removed when coming from plugin version 5.
This is because you never know what setting or method you can implement and for what platform.
In general, I simply add it to the docs of the field/method/class if it is supported or not by a specific platform.

In this case, probably we could update the implementation of types/proxy_rule.dart with the iOS/macOS specific-fields, such as "bool allowFailover;" and in the code docs you would have something like this:

  /// A Boolean that indicates whether or not a proxy configuration allows failover to non-proxied connections.
  /// Failover isn’t allowed by default.
  ///
  ///**Officially Supported Platforms/Implementations**:
  ///- iOS
  bool allowFailover;

Because WebKit.WKWebsiteDataStore.proxyConfigurations accepts an array of ProxyConfiguration, this way we can set an array of different configuration.

What do you think?

@yerkejs
Copy link
Author

yerkejs commented Oct 21, 2024

Thanks for feedback, yeah makes sense, I'll update PR

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