Post

Replies

Boosts

Views

Activity

Reply to How to pass parameter in Swift Async call
Found the fix for this. The sample testbed project for TransparentProxyProvider has synchronisation issue and is causing 'fatalError()' in 'extension Network.NWEndpoint', which causes crash of network extension. Fix for this synchronisation is to pass 'SupportFlow' as async argument:     if (supportedFlow != nil) {       self.queue.async { **[supportedFlow] in**         if (shouldBlock == true) {           // TODO with proper handling of flow           os_log(.debug, log: self.log, "TransparentProxy Provider want to block this TCP flow, flow: 0x%zx", flow.osLogID)           let error = NSError(domain: "", code: 0, userInfo: [NSLocalizedDescriptionKey : "Connection Refused"])           flow.closeReadWithError(error)           flow.closeWriteWithError(error)                     } else {           self.core.handleNewSupportedFlow(supportedFlow!, proxyServer!, proxyPort!)         }       }       os_log(.debug, log: self.log, "Provider did handle new flow, flow: 0x%zx", flow.osLogID)       return true     }
Sep ’22
Reply to Difference between PacketTunnelProvider and utun
Hi @meaton, One more clarification: Is my understanding correct for Apple's recommend approach, please correct me if I am wrong at any place: PacketTunnelProvider class in NetworkExtension framework can be used to activate and configure the utun interface. Now to define the network rules: either use "NEPacketTunnelNetworkSettings, ipv4Settings" settings or use "route add " command to route traffic on utun interface manually Now for tunneling IP-Packets, read/write operation can be directly done on the utun interface either by an app/service inside or outside the App Group. TIA
Jul ’22
Reply to Difference between PacketTunnelProvider and utun
Thanks for the response @meaton, I wanted to understand it further on how the manual route of creating utun interface and doing read/write can limit any functionalities. I was going through openvpn code and seems they also have used manual method to create utun interface to read/write operation for tunneling L3 packets. For me also it seems an easier way to use the utun method as it is easy to maintain the code avoiding the sandboxing and app groups and managing the inbound and outbound connections..
Jun ’22
Reply to How can a process outside AppGroup, addObserver for a TransparentProxyProvider Network VPN Interface
is your service visible to SCNetworkConnection? I dont see my service where you suggested: % networksetup -listallnetworkservices An asterisk (*) denotes that a network service is disabled. USB 10/100/1000 LAN Thunderbolt Bridge Wi-Fi Bluetooth PAN To get this working you need to start with a service ID. I’m not sure whether the system allocates a service ID for a transparent proxy. Do I need to anything special while configuring my TransparentProxyProvider in my App, which will let the system allocate serviceID to my VPN?
Oct ’21
Reply to How can a process outside AppGroup, addObserver for a TransparentProxyProvider Network VPN Interface
Thanks Quinn, both the approach will work for me. But the 2nd approach is more suitable as it will be independent of the App (SysEx) which is doing 'addObserver' for VPN status. I was trying to find a small example of code for: SCNetworkConnection vpnConn = <?> SCNetworkConnectionStatus status = SCNetworkConnectionGetStatus(vpnConn) Could you please help me with API and arg which i can use to get 'SCNetworkConnection' in my C++ project?
Oct ’21
Reply to How can a process outside AppGroup, addObserver for a TransparentProxyProvider Network VPN Interface
Thanks Matt and Quinn for your response. Is this other service signed by the same team as your sysex? Yes both systemExtn and service is signed by same team. And what context is it running in? As a daemon? Or in a GUI login context? Or something else? It is a daemon, but build outside the systemexten container. I have a limitation that I cannot keep this daemon in same container. I have related question, is there a way I could block/disable the 'Disconnect' button for the VPN in network settings? Current this can be disabled even without opening the lock (bottom). Or Can we somehow disable the effect of the disconnect action, ie user cannot stop VPN from this place?
Oct ’21
Reply to NetworkExtension: Unsatisfied entitlements: com.apple.security.application-groups
Next question: What are you hoping to gain by using an App Group? Which processes are you sharing content between? And what sort of content? We have app and library which does IPC communication with System Extension to Install and configure, in similar way it was done in Apple sample project for 'SimpleFirewall'. I could see 'com.apple.security.application-group' used there as well. But this 'app-group' entitlement as been working fine in Catallina (10.15) and Bigsur OS for Intel Mac machines. Why could it start failing in M1 macbooks? Also on some M1 machines it is working fine.
Oct ’21