Esempio n. 1
0
def get_network_caps():
    try:
        from xpra.net.mmap_pipe import can_use_mmap
        mmap = can_use_mmap()
    except:
        mmap = False
    caps = {
                "digest"                : ("hmac", "xor"),
                "compressors"           : compression.get_enabled_compressors(),
                "encoders"              : packet_encoding.get_enabled_encoders(),
                "mmap"                  : mmap,
               }
    caps.update(get_crypto_caps())
    caps.update(get_compression_caps())
    caps.update(get_packet_encoding_caps())
    return caps
Esempio n. 2
0
def get_network_caps():
    try:
        from xpra.net.mmap_pipe import can_use_mmap
        mmap = can_use_mmap()
    except:
        mmap = False
    caps = {
        "digest": ("hmac", "xor"),
        "compressors": compression.get_enabled_compressors(),
        "encoders": packet_encoding.get_enabled_encoders(),
        "mmap": mmap,
    }
    caps.update(get_crypto_caps())
    caps.update(get_compression_caps())
    caps.update(get_packet_encoding_caps())
    return caps
Esempio n. 3
0
def get_network_caps(legacy=True):
    try:
        from xpra.net.mmap_pipe import can_use_mmap
        mmap = can_use_mmap()
    except:
        mmap = False
    caps = {
        "digest": ("hmac", "xor"),
        "compressors": compression.get_enabled_compressors(),
        "encoders": packet_encoding.get_enabled_encoders(),
        "mmap": mmap,
    }
    if legacy:
        #for backwards compatibility only:
        caps.update({"raw_packets": True, "chunked_compression": True})
    caps.update(get_crypto_caps())
    caps.update(get_compression_caps())
    caps.update(get_packet_encoding_caps())
    return caps
Esempio n. 4
0
def get_network_caps():
    try:
        from xpra.net.mmap_pipe import can_use_mmap
        mmap = can_use_mmap()
    except:
        mmap = False
    digests = get_digests()
    #"hmac" is the legacy name, "xor" should not be used for salt:
    salt_digests = [x for x in digests if x not in ("hmac", "xor")]
    caps = {
        "digest": digests,
        "salt-digest": salt_digests,
        "compressors": compression.get_enabled_compressors(),
        "encoders": packet_encoding.get_enabled_encoders(),
        "mmap": mmap,
    }
    caps.update(get_crypto_caps())
    caps.update(get_compression_caps())
    caps.update(get_packet_encoding_caps())
    return caps
Esempio n. 5
0
def get_network_caps(legacy=True):
    try:
        from xpra.net.mmap_pipe import can_use_mmap

        mmap = can_use_mmap()
    except:
        mmap = False
    caps = {
        "digest": ("hmac", "xor"),
        "compressors": compression.get_enabled_compressors(),
        "encoders": packet_encoding.get_enabled_encoders(),
        "mmap": mmap,
    }
    if legacy:
        # for backwards compatibility only:
        caps.update({"raw_packets": True, "chunked_compression": True})
    caps.update(get_crypto_caps())
    caps.update(get_compression_caps())
    caps.update(get_packet_encoding_caps())
    return caps
Esempio n. 6
0
def get_network_caps(legacy=True):
    try:
        from xpra.net.mmap_pipe import can_use_mmap
        mmap = can_use_mmap()
    except:
        mmap = False
    caps = {
        "digest": ("hmac", "xor"),
        "rencode": use_rencode,
        "bencode": use_bencode,
        "lz4": use_lz4,
        "mmap": mmap,
    }
    if legacy:
        #for backwards compatibility only:
        caps.update({
            "raw_packets": True,
            "zlib": True,
            "chunked_compression": True
        })
    try:
        import Crypto
        caps["pycrypto.version"] = Crypto.__version__
        try:
            from Crypto.PublicKey import _fastmath
        except:
            _fastmath = None
        caps["pycrypto.fastmath"] = _fastmath is not None
    except:
        pass

    if has_rencode:
        caps["rencode.version"] = rencode_version
    if has_bencode:
        caps["bencode.version"] = bencode_version
    return caps
Esempio n. 7
0
def get_network_caps(legacy=True):
    try:
        from xpra.net.mmap_pipe import can_use_mmap
        mmap = can_use_mmap()
    except:
        mmap = False
    caps = {
                "digest"                : ("hmac", "xor"),
                "rencode"               : use_rencode,
                "bencode"               : use_bencode,
                "lz4"                   : use_lz4,
                "mmap"                  : mmap,
               }
    if legacy:
        #for backwards compatibility only:
        caps.update({
                "raw_packets"           : True,
                "zlib"                  : True,
                "chunked_compression"   : True
                })
    try:
        import Crypto
        caps["pycrypto.version"] = Crypto.__version__
        try:
            from Crypto.PublicKey import _fastmath
        except:
            _fastmath = None
        caps["pycrypto.fastmath"] = _fastmath is not None
    except:
        pass

    if has_rencode:
        caps["rencode.version"] = rencode_version
    if has_bencode:
        caps["bencode.version"] = bencode_version
    return caps