Post

Replies

Boosts

Views

Activity

Reply to When to close NEAppProxyUDPFlow?
So, I think I understood how things work. Since the transport layer(my transparent proxy) can't decide if more data is coming from the remote side of the connection or not it should not do that. And rely on the app layer which can. From practical tests, readDatagrams callback will not return empty the datagrams and remote endpoints arrays(EOF sign) until the app that opened socket(flow) is satisfied with the number of datagrams received from the remote side. So, to summarize: Close connection and flow in case of errors Close flow as per documentation to readDatagrams function: If the datagrams and remoteEndpoints arrays are non-nil but are empty, then no more datagrams can be subsequently read from the flow.
Aug ’21
Reply to Cast or convert Network.NWInterface to nw_interface_t
I have been writing a router suing system network extension(NEAppProxyProvider). Its task is to send traffic to different network interfaces based on bundle id. From what I understood there is no way to convert between nw_interface_t  and Network.NWInterface types and I should use nw_path_monitor nw_path_enumerate_interfaces to get an instance of nw_interface_t and search its name in NWInterface list received by NWPathMonitor path.availableInterfaces
Jul ’21