PROXY protocol v1 / v2 support
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- networking
Research direction
No repository files or tests are named. Start by reading the linked HAProxy PROXY protocol specification and comparing Gunicorn's --proxy-protocol behavior; done should mean httptools supports the requested PROXY protocol v1 and v2 client information before the HTTP request.
Written by the indexing model from the issue text.
Description
Behind a reverse-proxy or a load balancer, you often need to get the original client IP.
A lot of load balancer provide these information with the PROXY protocol - HAproxy for exemple.
I have a load balancer that provide only this method to get the client info, and I would not be the only one.
Here a doc of the protocol: http://www.haproxy.org/download/2.4/doc/proxy-protocol.txt
In a nutshell, it's one line added on top of the body, here for the v1 protocol:
PROXY TCP4 192.168.0.1 192.168.0.11 56324 443\r\n
GET / HTTP/1.1\r\n
Host: 192.168.0.11\r\n
\r\n
This protocol is implemented in Gunicorn, and can be activated with --proxy-protocol: https://docs.gunicorn.org/en/stable/settings.html#proxy-protocol
edit: A NodeJS parser: https://github.com/racker/node-proxy-protocol/blob/master/index.js
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MagicStack/httptools
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MagicStack/httptools#136 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
MagicStack/httptools#140 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
MagicStack/httptools#127 · 2 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
MagicStack/httptools#126 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
MagicStack/httptools#125 ·
All issues in MagicStack/httptools
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·