-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[FEATURE] Use proxy exclusion instead of a separate proxied client #1039
Comments
Hey everyone, I just started contributing very recently, I see this issue is tagged "good first issue", unfortunately there is a lot of knowledge I don't have that is needed to solve this issue, |
Hey @EliKalter, I see that you're already assigned to #899 and are working on it. For now, we'll leave this issue open to any other interested contributors. You may pick this up once your work on #899 is completed, and if no other contributors have expressed interest on this. I hope that's fine by you.
Once assigned you can connect with a mentor in our Discord server for guidance on fixing the issue or implementation specific doubts.
To explain the issue in more detail, we use a proxy to make external requests (there are a number of reasons people do this). However, we don't want to use proxy for some internal services (for example, our card locker): hyperswitch/crates/router/src/services/api/client.rs Lines 113 to 128 in 36cc13d
You can check the current implementation of the client, which we want to refactor with the no_proxy functionality. To understand what a "connector" is, you can refer to our connector integration guide. As for "basilisk" and "locker", they are just some internal services which will be open-sourced as separate repositories once they are stable. |
Hey, can I work on this ? |
Hey @divinenaman, I'd also recommend taking a look at #1919 & designing your solution based on that let us know here (or discord) if you need any help... |
@lsampras few questions:
|
Yup, adding those URL's to no_proxy should work out,
Currently we can have differing client certificates that are specific to each connector. In that case we end up creating a new client instead of re-using. You can skip this case since it doesn't apply to our optimization. (If we are anyways creating a new client doesn't make sense to apply selective proxy rules)
You'll need to use a local proxy (there seem to be quite a lot of options depending on your OS etc.), Testing the whitelist's for locker doesn't seem possible for now (since there's no way to host that locally) |
Since we've felt the need for this recently, I'll be taking this up. |
Feature Description
Currently we provide the option for proxying all external requests made to Connectors. We also use reqwest clients to make API calls to basilisk/locker or other utilities.
Recently we started reusing the
reqwest::Client
(via once_cell) for performance reasonsOur current approach involves maintaining 2 clients:
Currently we need to maintain a list of the services that should bypass proxy & choose a client accordingly. This adds a bit of a boilerplate whenever we try to make requests.
Possible Implementation
Expected behavior:
Instead we want to push this behavior down to the reqwest library…
we believe the no_proxy function should help us avoid this maintenance.
We would ideally accept a list of
proxy_bypass_urls
as part of our config which would then be used to create a singlereqwest::Client
which can be used for internal + external servicesHave you spent some time to check if this feature request has been raised before?
Have you read the Contributing Guidelines?
Are you willing to submit a PR?
No, I don't have time to work on this right now
The text was updated successfully, but these errors were encountered: