3 ms·
User space proxying for protocols other than http, though, is a bit tricky. If you aren't exposing things like source ip, listen queue depth, buffer sizes, err
by tyingq 9y ago
User space proxying for protocols other than http, though, is a bit tricky. If you aren't exposing things like source ip, listen queue depth, buffer sizes, errno from failures, etc...you are potentially limiting how well it works. Plus the read/write overhead. I'm not convinced this is any better than other approaches. Brokered iptables (or pf,etc) port rewrites seems cleaner, though it has issues as well.
- sigil 9y ago> If you aren't exposing things like source ip, listen queue depth, buffer sizes, errno from failures, etc...you are potentially limiting how well it works. This is a good point. > Plus the read/write overhead. The author's code uses OpenBSD's `SO_SPLICE` for zero-copy socket data transfers. http://man.openbsd.org/OpenBSD-5.4/setsockopt.2 http://man.openbsd.org/OpenBSD-5.4/setsockopt.2 Edit: apparently `SO_SPLICE` can't splice IP sockets onto unix domain sockets yet, so the presented code is kind of wishful thinking. It sounds like this is in the works though.