luasocket
luasocket copied to clipboard
getsockopt support
I want to use luasocket to implement a proxy function, but the destination address and port seen after the TCP connection is redirected by iptables have changed. Therefore, getsockopt is needed to get the original destination address and port. Are there any plans to provide more API support?
error = getsockopt(fd, SOL_IPV6, IP6T_SO_ORIGINAL_DST, destaddr, &socklen);
error = getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, destaddr, &socklen);