Hi Team,
I am utilizing the nw_parameters_create_secure_tcp in Objective-C to establish a TCP connection. However, I would like the connection to go through a specific utun interface.
I attempted to use the following method for binding:
nw_parameters_require_interface(nw_parameters_t parameters,
_Nullable nw_interface_t interface);
Unfortunately, I haven't found any API that can convert a utun interface name or index to an nw_interface_t object. Both nw_interface_create_with_index and nw_interface_create_with_name are private methods.
I also tried using nw_path_monitor_set_update_handler and nw_path_enumerate_interfaces, but they did not return the utun interface.
Could you please suggest how I can obtain the utun interface as an nw_interface_t?
1
0
720