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

reverseproxy: allow user to define source address #6504

Merged
merged 6 commits into from
Aug 22, 2024
Merged

Conversation

mohammed90
Copy link
Member

@mohammed90 mohammed90 commented Aug 10, 2024

TODO:

  • Caddyfile support

Closes #6503

Closes #6503

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
@mohammed90 mohammed90 added feature ⚙️ New feature or request needs docs ✍️ Requires documentation changes needs tests 💯 Requires automated tests labels Aug 10, 2024
@mohammed90 mohammed90 added this to the v2.9.0 milestone Aug 10, 2024
@mohammed90
Copy link
Member Author

mohammed90 commented Aug 10, 2024

This failure appears to be legit because it fails even locally for me, though not related to this PR

https://github.com/caddyserver/caddy/actions/runs/10331386719/job/28601743464?pr=6504#step:3:4268

Edit: git bisect identifies 59cbb2c as the bad commit.

@francislavoie
Copy link
Member

francislavoie commented Aug 10, 2024

I think users might want to use an interface name instead of an IP as well, we'd likely want to support that too? I've had this owasp-amass/amass@f5c3960 bookmarked for a long time as a reference for how to do that.

@mohammed90
Copy link
Member Author

I think users might want to use an interface name instead of an IP as well, we'd likely want to support that too? I've had this owasp-amass/amass@f5c3960 bookmarked for a long time as a reference for how to do that.

I'd solve that differently. We can use the new RegisterNetwork function to register a network called interface processing a network address looking like this, e.g.: interface/eth0:port. Then the implementation in this PR inherits the utility by default. What do you think?

@mohammed90 mohammed90 marked this pull request as ready for review August 22, 2024 19:46
@mholt mholt enabled auto-merge (squash) August 22, 2024 19:47
@mholt mholt removed needs docs ✍️ Requires documentation changes needs tests 💯 Requires automated tests labels Aug 22, 2024
@mholt mholt merged commit 4ade967 into master Aug 22, 2024
23 checks passed
@mholt mholt deleted the transport-source-addr branch August 22, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request]reverse_proxy can setting source address for connecting upstreams
3 participants