Class SanitizedBridgesWriter

  • All Implemented Interfaces:
    java.lang.Runnable, java.util.concurrent.Callable<java.lang.Object>

    public class SanitizedBridgesWriter
    extends CollecTorMain

    Sanitizes bridge descriptors, i.e., removes all possibly sensitive information from them, and writes them to a local directory structure. During the sanitizing process, all information about the bridge identity or IP address are removed or replaced. The goal is to keep the sanitized bridge descriptors useful for statistical analysis while not making it easier for an adversary to enumerate bridges.

    There are three types of bridge descriptors: bridge network statuses (lists of all bridges at a given time), server descriptors (published by the bridge to advertise their capabilities), and extra-info descriptors (published by the bridge, mainly for statistical analysis).

    • Constructor Detail

      • SanitizedBridgesWriter

        public SanitizedBridgesWriter​(Configuration config)
        Initialize configuration.
    • Method Detail

      • module

        public java.lang.String module()
        Description copied from class: CollecTorMain
        Returns the module name for logging purposes.
        Specified by:
        module in class CollecTorMain
      • syncMarker

        protected java.lang.String syncMarker()
        Description copied from class: CollecTorMain
        Returns property prefix/infix/postfix for Sync related properties.
        Specified by:
        syncMarker in class CollecTorMain
      • sanitizeAndStoreNetworkStatus

        public void sanitizeAndStoreNetworkStatus​(byte[] data,
                                                  java.lang.String publicationTime,
                                                  java.lang.String authorityFingerprint)
        Sanitizes a network status and writes it to disk.
      • sanitizeAndStoreServerDescriptor

        public void sanitizeAndStoreServerDescriptor​(byte[] data)
        Sanitizes a bridge server descriptor and writes it to disk.
      • sanitizeAndStoreExtraInfoDescriptor

        public void sanitizeAndStoreExtraInfoDescriptor​(byte[] data)
        Sanitizes an extra-info descriptor and writes it to disk.