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 support for HTTP(S) proxies #3489

Closed
4 tasks done
cthu1hoo opened this issue Jul 5, 2023 · 2 comments
Closed
4 tasks done

Add support for HTTP(S) proxies #3489

cthu1hoo opened this issue Jul 5, 2023 · 2 comments
Labels
area: deployment Related to deploying Lemmy in production enhancement New feature or request

Comments

@cthu1hoo
Copy link

cthu1hoo commented Jul 5, 2023

Requirements

  • Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a feature request? Do not put multiple feature requests in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Is your proposal related to a problem?

Outbound HTTP requests backend makes would fail if Lemmy instance has no direct outbound internet connection.

Describe the solution you'd like.

Please consider adding HTTP(S) proxy support for outgoing requests, HTTP_PROXY environment variable is an industry standard, of sorts. Config option would also work, of course.

Thanks in advance.

Describe alternatives you've considered.

I've thought about things like routing Lemmy backend container traffic via wireguard client container but I'd rather not. :)

Additional context

No response

@cthu1hoo cthu1hoo added the enhancement New feature or request label Jul 5, 2023
@dhawos
Copy link
Contributor

dhawos commented Jul 5, 2023

I think this is actually already supported from what I can read in the documentation from the library that is used to make those request : https://docs.rs/reqwest/latest/reqwest/index.html#proxies

I've tried to set the variables locally to an invalid address and the requests failed, when they succeeded if I did not set these variables

@cthu1hoo
Copy link
Author

cthu1hoo commented Jul 5, 2023

I've tried setting HTTP_PROXY for the lemmy (backend) container and it broke the whole thing for me, i.e. white page with "Server error" and that's it.

Proxy logs show that inter-container traffic within lemmy compose setup also goes through the proxy, which obviously is not aware of http://pictrs/... and any other non-fqdn names which only resolve inside the container. So those need to be excluded somehow.

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

No branches or pull requests

3 participants