The debug model Vpn can take effect, but the release mode Vpn does not take effect. I suspect that the data packets written to the device are captured.
...
let ip4Set = ...
ip4Set.includedRoutes = [NEIPv4Route.default()]
...
func readDevicePackets(){
...
packetFlow.readPacketObjects { (packetList) in
...
let sendPackList: [NEPacket] = ..
...
packetFlow.writePacketObjects(sendPackList)
readDevicePackets()
}
}
Post
Replies
Boosts
Views
Activity
Thank you very much for your answer, but I use NEPacketTunnelProvider in the NetworkExtension for packet transmission. The code is as follows:
import NetworkExtension
class PacketTunnelProvider: NEPacketTunnelProvider {
...
packetFlow.readPacketObjects
packetFlow.writePacketObjects
}
The same code can send data packets when compiled in release mode in xcode14, but it can only be sent in debug mode in xcode15, not in release mode, so now I am very confused.