nadoo / glider

glider is a forward proxy with multiple protocols support, and also a dns/dhcp server with ipset management features(like dnsmasq).
GNU General Public License v3.0
3.1k stars 422 forks source link

support for proxy protocol (v2) ? #123

Open bcookatpcsd opened 5 years ago

bcookatpcsd commented 5 years ago

Does this support the proxy protcol (v2)?

If so, how do I use it?

I can't seem to find it if it does.

1an8r0wn commented 5 years ago

Can you tell what proxy protcol (v2) exactly is ?

bcookatpcsd commented 5 years ago

https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt

https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol

https://github.com/squid-cache/squid/blob/master/doc/rfc/proxy-protocol.txt

http://www.squid-cache.org/Doc/config/proxy_protocol_access/

in short it simply passes the connecting hosts ip information to the backend proxy..

so glider logs will show the client and not haproxy or whatever front end load balancer you might be using..

nadoo commented 4 years ago

Is there any reason to use haproxy but not glider's built in scheduling algorithm?

bcookatpcsd commented 4 years ago

With the proxy protocol, the glider would pass the client ip to the next server or if glider is the next host.

If glider(exit) is on 10.0.0.1 and client is 20.0.0.1 gliders log would show 20.0.0.1

If something is in front of glider, say haproxy or another glider instance.. haproxy or glider ( front ) is 30.0.0.1 and passes to glider (exit)

Client 20.0.0.1 would hit 30.0.0.1 and pass to exit. Exit would show client 20.0.0.1 even though it passed through 30.0.0.1 and then 10.0.0.1

The proxy protocol passes the client to servers that understand it.

On Sun, Oct 6, 2019 at 1:01 AM 1an8r0wn notifications@github.com wrote:

Can you tell what proxy protcol (v2) exactly is ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nadoo/glider/issues/123?email_source=notifications&email_token=ANEJBRLEQPHHQA426BF3RUDQNFWJ7A5CNFSM4I4P73KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOBRCI#issuecomment-538712201, or mute the thread https://github.com/notifications/unsubscribe-auth/ANEJBRNWFJQ562CKT5VXKXDQNFWJ7ANCNFSM4I4P73KA .

-- Network Analyst Poughkeepsie City School District SMS & Mobile: (202) 810-5827 twitter.com/bcookatpcsd

If you can't explain it simply, you don't understand it well enough.

--

This message may contain confidential information and is intended only for the individual(s) named. If you are not an intended recipient you are not authorized to disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system.

nadoo commented 4 years ago

Thanks for your explanation, I know what the proxy protocol did, but I always use glider without haproxy in the front, glider has built in load balancing features, why do we need haproxy here?

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.