Skip to content
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.

Do we have proxy chain support? #62

Closed
arunoda opened this issue Mar 12, 2015 · 8 comments
Closed

Do we have proxy chain support? #62

arunoda opened this issue Mar 12, 2015 · 8 comments

Comments

@arunoda
Copy link

arunoda commented Mar 12, 2015

Let's say we are already behind a proxy(In my case Cloudflare) and it has added x-forwarded headers. In that case, does bud build a proxy chain for x-forwarded like this.

headers['x-forwarded-for'] = 'client-ip, cloudflare-ip';
@r--s
Copy link

r--s commented Mar 12, 2015

It should be handled on lb level, as we are already adding x-forwareded-for, and it's being stripped of by apache rpaf module.

@arunoda
Copy link
Author

arunoda commented Mar 12, 2015

It can't handled by the LB level. Then LB thinks it gets the request from bud not from the client.
I'm asking whether is BUD going to maintain a proxy chain in the x-forwarded-for or it will replace it with the existing x-forwarded.

This is because, something our nodes directly handles client requests and sometimes they get requests from a LB.

node-http-proxy does this well. But we don't want it to handle SSL/TLS termination.

@r--s
Copy link

r--s commented Mar 12, 2015

I'm sorry, I've misstook project for different one. You are right.

@indutny
Copy link
Owner

indutny commented Mar 12, 2015

@arunoda I'm afraid bud we'll just add extra header line to the first request. So technically, first request will have proper proxy chain, but you'll need to prepend first address from the chain manually to the all further requests on the connection.

Please note that X-Forwarded-For feature does not parse http.

@arunoda
Copy link
Author

arunoda commented Mar 12, 2015

I see. So, it'll possible to have multiple actual clients connection behind a one BUD socket connection.
(May be that's okay, we can live with it)

We are building a kind of rate limiting system, needs client ip for part of it's logic.

@indutny
Copy link
Owner

indutny commented Mar 12, 2015

@arunoda not just Bud, this is quite normal for HTTP: one TCP socket - multiple requests. Anyway, this should be easy to handle in io.js/node.js.

Assuming resolved?

@arunoda
Copy link
Author

arunoda commented Mar 12, 2015

Yeah got it. We can mark it as resolved.

Thanks.

@arunoda arunoda closed this as completed Mar 12, 2015
@indutny
Copy link
Owner

indutny commented Mar 12, 2015

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants