This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func handlePacket(packetData: Data,syntheticIp: String) { | |
| if(syntheticIp == "" || syntheticIp.isEmpty){ | |
| os_log(.default, log: self.log, "*****No synthetic ip found") | |
| return | |
| } | |
| let udpPayload : Data = packetData[28..<packetData.count] | |
| do { | |
| //to deserialize we used https://github.com/Bouke/DNS | |
| let dnsQuery = try Message(deserialize: udpPayload) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ViewController.swift | |
| // vpn-client | |
| // | |
| // Created by Aravindh Kumar on 9/13/23. | |
| // | |
| import UIKit | |
| import Network | |
| import NetworkExtension |
OlderNewer