luasocket icon indicating copy to clipboard operation
luasocket copied to clipboard

getsockopt support

Open zengming00 opened this issue 4 years ago • 0 comments

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);

zengming00 avatar Jun 24 '21 09:06 zengming00