icgood / proxy-protocol Goto Github PK
View Code? Open in Web Editor NEWPROXY protocol library with asyncio server implementation
License: MIT License
PROXY protocol library with asyncio server implementation
License: MIT License
A proxyprotocol-server
command-line tool that proxies ports to a destination, sending a PROXY protocol header at the beginning of the outbound connection.
Add read_socket
method that can be used by sockets not managed by asyncio. This should also work with gevent sockets.
Thanks very much for providing this library, and for providing examples of both a server and a proxy. It made it very easy to experiment with this!
Do you have any plans to add support for UDP (SOCK_DGRAM) traffic over proxy protocol v2? I've been reading the spec at https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt to try and figure out what things look like on the wire in that case, but I've been unable to find any client or server implementations I could use as an example. It looks like HAProxy may not support UDP, and even NGINX which does support UDP may not support proxy protocol for it. I see signs that some cloud provider load balancers support UDP, but I don't have a setup which allows me to easily test in any of those environments right now.
In particular, it isn't clear to me whether the proxy protocol header is added to every UDP packet or only at the start of a new flow. If it is only added at the start, it isn't clear to me how servers would recover if the packet with this header was lost in transit, or if it arrived out of order.
The closest thing I've found so far is from CloudFlare at https://developers.cloudflare.com/spectrum/proxy-protocol which says for UDP that the proxy protocol v2 header will be prepended to the first packet on a stream, but this doesn't seem to address recovery in the case of packet loss or reordering. That link also describes an alternative "simple proxy protocol" header which is specifically for UDP and puts the header at the beginning of every UDP packet. However, that seems to be a CloudFlare-specific alternative to proxy protocol v2 and I'm not sure that would be available anywhere else.
If you have any more information on support for UDP with proxy protocol v2 in general, that would also be appreciated!
This Exceptions is reached only when the 'crc32c' package is missing.
proxy-protocol/proxyprotocol/tlv.py
Line 209 in 4b9fec7
I think that the Exception should mention that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.