Pseudo IPv4 addresses for IPv6 users - OpenResty
CloudFlare was gracious enough to open source a Lua function to convert IPv6 addresses into pseudo IPv4 addresses using the Class E addressesing space.
The class E block of addresses are reserved and cannot be used for external routed devices, so we know there won’t be an overlap with existing IPv4 users.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
Reference: http://blog.cloudflare.com/eliminating-the-last-reasons-to-not-enable-ipv6/ http://stackoverflow.com/questions/10975935/lua-function-check-if-ipv4-or-ipv6-or-string http://wiki.nginx.org/HttpLuaModule#ngx.send_headers https://github.com/octohost/openresty