Hello. I'm developing a transparent proxy network extension by extending NETransparentProxyProvider
. How can I get the original socket's options, i.e. what the app set using setsockopt()
calls, from an NEAppProxyFlow
? I'm particularly interested in the value of SO_KEEPALIVE
, so I can enable keep-alives on my proxy's outgoing socket if they were enabled on the socket being proxied.
I got as far as -[NEAppProxyFlow setMetadata:]
-> nw_parameters_copy_default_protocol_stack(nw_parameters_t)
-> nw_protocol_stack_copy_transport_protocol(nw_protocol_stack_t)
, which returns an object of type nw_protocol_options_t
, but there are no accessor functions to retrieve the actual values from it.