NEProxySettings and UDP traffic

138 Views Asked by At

I'm new to iOS development and would like to gain some understanding about how NEPacketTunnelProvider handles for UDP traffic.

In my code, I've created NEPacketTunnelNetworkSettings

let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: proxyHost)

let ipv4Settings = NEIPv4Settings(
    addresses: ["127.0.0.1"],
    subnetMasks: ["255.255.255.255"]
)
settings.ipv4Settings = ipv4Settings

let proxySettings = NEProxySettings()
...
settings.proxySettings = proxySettings

and passed it to the setTunnelNetworkSettings function. And I was able to start the VPN with no issues.

However, in the debug tool, I couldn't see any UDP traffic which I'm sure there should be some. The only UDP connection had no traffic constantly. enter image description here

Does the NEProxySettings only work for TCP? What am I missing here? (I've set protocolConfiguration?.includeAllNetworks = true in my NETunnelProviderManager)

0

There are 0 best solutions below