Post

Replies

Boosts

Views

Activity

Reply to NEFilterDataProvider and NETransparentProxyProvider incompatiblity (breaks Safari websocket connections and other software)
Thanks for the info. I hope it will be fixed soon. Obviously if your use case is to run a NEFilterDataProvider and a NEProxyTransparentProvider in tandem then this is a very slim workaround, I think that the tandem usage within the same app is a rare case. What is much more frequent and confusing is a conflict between two apps from independent vendors.
Dec ’20
Reply to NEFilterDataProvider and NETransparentProxyProvider incompatiblity (breaks Safari websocket connections and other software)
Yes, this is disappointing. Safari WebSocket and https://developer.apple.com/forums/thread/666894 (FB8925105) are affected by the same problem. When the problem happens, Console outputs the following messages. When using over HTTPS: default 02:48:18.529584-0800 com.apple.WebKit.Networking CFNetwork SSLHandshake failed (-9810) error 02:48:18.529628-0800 com.apple.WebKit.Networking TCP Conn 0x7fbabecf04e0 SSLHandshake failed (-9810) default 02:48:18.531516-0800 com.apple.WebKit.Networking TCP Conn 0x7fbabecf04e0 canceled But with HTTP we see the underlying problem: error 02:46:23.243727-0800 com.apple.WebKit.Networking SocketStream write error [0x7fbabed57fc0]: 1 32 default 02:46:23.244424-0800 com.apple.WebKit.WebContent WebSocketChannel 0x10906b3d8 fail() reason='<private>' default 02:46:23.245953-0800 com.apple.WebKit.Networking TCP Conn 0x7fbabed57fc0 canceled Please notice "SocketStream write error [0x7fbabed57fc0]: 1 32". Error 32 is "broken pipe".
Dec ’20
Reply to NEFilterDataProvider and NETransparentProxyProvider incompatiblity (breaks Safari websocket connections and other software)
Hello, I guess we suffer from the same problem too (TSI 753464789). Apparently, that besides Safari websockets, it affects built-in ssh client if connected by hostname (broken pipe error) and any client program that uses NSStream/CFStream! Console may give errors like "TestNSStream[1545:26660] SocketStream write error [0x10060b360]: 1 32" Can you please confirm this with your tests and update your FB if appropriate?
Nov ’20
Reply to AppProxy breaks existing connections
Yes, existing connection may see interruptions and may have to be restarted. Is that what you are seeing too? Yes, this is what we see and this is a concern. So for example, if you establish SSH connection before AppProxy is activated, this existing SSH connection gets disconnected. Is this expected? If so, this is not optimal.
Sep ’20
Reply to AppProxy breaks existing connections
For example, the rule can be like this: NENetworkRule(remoteNetwork: nil, remotePrefix: 0, localNetwork: nil, localPrefix: 0, protocol: .TCP, direction: NETrafficDirection.outbound) It's very easy to reproduce. Just open a persistent TCP connection like SSH. Run a simple transparent proxy. Observe that SSH connection is broken. do you have the flow copying process in place to pickup and handle these connections? Yes, but this logic applies to the new connection only. Correct? How is it possible to do this for the existing ones?
Sep ’20
Reply to NetworkExtension breaks Safari
Thanks for your reply. This goes along with my point above about using the NWHostEndpoint in the remote side of the connection. Are you unable to use this here? We use NWHostEndpoint to connect to the remote site without a problem (socket API: gethostbyname and connect). The problem is that this breaks Safari somehow. If you use the hostname provided by NEAppProxyTCPFlow do you still receive these errors in Safari: Exactly. That's the whole point! Can you please try to make your TransparentProxy sample to capture all flows from Safari and open a YouTube video? Safari console should be full of such errors. By the way, is there a publicly available sample of NEAppProxyProvider? We were unable to find anything.
Sep ’20
Reply to NetworkExtension breaks Safari
Safari throwing these errors due to an altered origin IP does make sense if the client application in Safari has configured their site in this way. The problem is that when an extension processes Safari’s flows, IP address does not appear anywhere in NEAppProxyFlow API at all. From remoteEndpoint docs: https://developer.apple.com/documentation/networkextension/neappproxytcpflow/1406233-remoteendpoint If the flow’s corresponding socket was created using one of the high-level networking APIs such as URLSession or NSURLConnection, then the hostname property of the remoteEndpoint object contains the DNS name of the remote host. If the flow’s corresponding socket was created using the sockets API directly, then the hostname property of the remoteEndpoint object contains the IP address of the remote host. So, in our case it is DNS name only, there is no IP address and we cannot set or alter it in the extension. As for your questions, Do you have anything in place that would alter the remoteEndpoint delivered by the system for NEAppProxyFlow?  For example a system level proxy or a PAC proxy for certain endpoints that would have already altered the remoteEndpoint? No, we test on a clean system. These are flows that you are instructing your proxy to handle, correct? For the test scenario, the extension processes all TCP flows on the system and just "forwards" them to the original destinations. It acts like a transparent proxy and there is no an actual proxy sever involved. Do you have any other filtering rules in place that would cause the remoteEndpoint to show up as 0.0.0.0? No.
Sep ’20