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 HTTP Proxy to ClientOptions #26

Open
sonvirgo opened this issue Dec 3, 2024 · 1 comment · May be fixed by #27
Open

Add HTTP Proxy to ClientOptions #26

sonvirgo opened this issue Dec 3, 2024 · 1 comment · May be fixed by #27
Labels
enhancement New feature or request

Comments

@sonvirgo
Copy link

sonvirgo commented Dec 3, 2024

Feature request

Is your feature request related to a problem? Please describe.

I am accessing supabase from inside corporate network, which require all traffic to go through a HTTP Proxy. So I have to access Restful API through the Http Proxy. And I don't want to use Tun/Tap interface -> Http Proxy.

Describe the solution you'd like

An additional option to tunnel all supabase Restful API through a HTTP Proxy.

Describe alternatives you've considered

Turn or VPN -> Http Proxy, but it is suboptimal as it will affect all other application in my device.

Additional context

Behind corporate network, strict network.

@sonvirgo sonvirgo added the enhancement New feature or request label Dec 3, 2024
4cecoder added a commit to 4cecoder/supabase-go that referenced this issue Dec 6, 2024
Fixes supabase-community#26

Add HTTP Proxy support to ClientOptions.

* **client.go**
  - Add `Proxy` field to `ClientOptions` struct to configure HTTP Proxy.
  - Update `NewClient` function to use `Proxy` field if provided.
  - Update `clientOptions` struct to include `proxy` field.
  - Update `NewClient` function to set `proxy` field in `clientOptions`.

* **client_test.go**
  - Add test cases to verify HTTP Proxy functionality in `TestFrom`.
  - Add test cases to verify HTTP Proxy functionality in `TestRpc`.
  - Add test cases to verify HTTP Proxy functionality in `TestStorage`.
  - Add test cases to verify HTTP Proxy functionality in `TestFunctions`.

* **README.md**
  - Add documentation on how to configure HTTP Proxy in `ClientOptions`.
  - Add example code snippet for configuring HTTP Proxy.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/supabase-community/supabase-go/issues/26?shareId=XXXX-XXXX-XXXX-XXXX).
@4cecoder 4cecoder linked a pull request Dec 6, 2024 that will close this issue
@sonvirgo
Copy link
Author

Great. Thanks @4cecoder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant