import Foundation

class RawSocketFactory {
    static func getRawSocket() -> RawSocketProtocol {
//        return GCDTCPSocket()
        return NWTCPSocket()
    }
}

import Foundation

class RawSocketFactory {
    static func getRawSocket() -> RawSocketProtocol {
        if NetworkInterface.TunnelProvider == nil {
            return GCDTCPSocket()
        } else {
            return NWTCPSocket()
        }
    }
}

Fix the bug that it now works with and without NetworkExtension
Fix the bug that it now works with and without NetworkExtension
