ios vpn app
This commit is contained in:
1 parent
96f16399d7
commit
1b506b9ee7
48 files changed
+4934
-45
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import NetworkExtension
|
||||
import Mobile
|
||||
|
||||
final class PacketFlowSink: NSObject, IosPacketFlowSinkProtocol {
|
||||
private weak var flow: NEPacketTunnelFlow?
|
||||
|
||||
init(flow: NEPacketTunnelFlow) {
|
||||
self.flow = flow
|
||||
}
|
||||
|
||||
func writePacket(_ packet: Data?, afFamily: Int) {
|
||||
guard let packet, let flow else { return }
|
||||
flow.writePackets([packet], withProtocols: [NSNumber(value: afFamily)])
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user