MagicStack / MagicStack/httptools
PROXY protocol v1 / v2 support
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 1.3k
- Forks
- 107
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Aucun fichier ni test du dépôt n’est nommé. Commencez par lire la spécification liée de HAProxy PROXY protocol et comparer le comportement de --proxy-protocol de Gunicorn ; le travail doit être considéré comme terminé lorsque httptools prend en charge les informations client demandées de PROXY protocol v1 et v2 avant la requête HTTP.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- networking
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100