missing files added

This commit is contained in:
Alex Kh 2021-12-31 10:58:36 +04:00
parent db527be97c
commit 7131257354
227 changed files with 16475 additions and 0 deletions

View file

@ -0,0 +1,21 @@
import Foundation
import NetworkExtension
import Tun2socks
class AmneziaTun2SocksWriter: NSObject, Tun2socksTunWriterProtocol {
var tunnelFlow: NEPacketTunnelFlow
init( withPacketFlow nepflow: NEPacketTunnelFlow) {
self.tunnelFlow = nepflow
super.init()
}
func write(_ p0: Data?, n: UnsafeMutablePointer<Int>?) throws {
if let packets = p0 {
tunnelFlow.writePackets([packets], withProtocols: [NSNumber(value: PF_INET)])
}
}
func close() throws {}
}