Let's say Mac has two Internet connections. One is LAN, the other is Wifi. LAN is primaryInterface. In NE Transparent Proxy provider, I want to split tunnel based on App/Process or destination IP address. For example, in [MyNEAppProxyProvider(subclass of NEAppProxyProvider) handleNewFlow:flow], if the destination IP is IP1, I want this traffc to go through Wifi. So I call BSD bind() to Wifi address, connect() to IP1, then transfer data between flow and the new connection(via Wifi). Is it possbile to do it in this way? Any help would be appreciated.
I have a couple of things you might try:
Rather than binding to the interface’s source address, trying binding to the interface directly, that is, using
.IP_BOUND_IF
You wrote:
I set IP1 to
NETransparentProxyNetworkSettings.includedNetworkRules
Just for the sake of experiment, try catching this connection via other means. For example, use a rule that matches a wildcard address and the destination port. Does the
bind
/
connect
work then?
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"