[auto-ipv6] rewrite lua