Class ClientIDPlugin

    • Field Detail

      • BIGLYBT_CLIENT_NAME

        private static final java.lang.String BIGLYBT_CLIENT_NAME
        See Also:
        Constant Field Values
      • BIGLYBT_CLIENT_NAME_SM

        private static final java.lang.String BIGLYBT_CLIENT_NAME_SM
        See Also:
        Constant Field Values
      • send_os

        private static boolean send_os
      • core

        private Core core
    • Constructor Detail

      • ClientIDPlugin

        public ClientIDPlugin()
    • Method Detail

      • getInitialProperties

        public java.util.Properties getInitialProperties()
        Specified by:
        getInitialProperties in interface Plugin
      • initialize

        public void initialize​(Core _core)
      • generatePeerID

        public byte[] generatePeerID​(byte[] hash,
                                     boolean for_tracker)
        Description copied from interface: ClientIDGenerator
        generate a peer id - must be exactly 20 bytes
        Specified by:
        generatePeerID in interface ClientIDGenerator
        for_tracker - generator to give to tracker or for peer-peer comms
        Returns:
      • getProperty

        public java.lang.Object getProperty​(byte[] hash,
                                            java.lang.String property_name)
        Specified by:
        getProperty in interface ClientIDGenerator
      • doHTTPProperties

        protected void doHTTPProperties​(java.util.Properties properties)
      • generateHTTPProperties

        public void generateHTTPProperties​(byte[] hash,
                                           java.util.Properties properties)
        Description copied from interface: ClientIDGenerator
        generate appropriate properties to be supplied to HTTP(S) URL connection If you want to access the torrents then you need to decode the URL to extract the hashes and then look them up (for scrape there could be multiple torrents) Enabled when the generator isn't specified as a filter
        Specified by:
        generateHTTPProperties in interface ClientIDGenerator
      • filterHTTP

        public java.lang.String[] filterHTTP​(byte[] hash,
                                             java.lang.String[] lines_in)
        Description copied from interface: ClientIDGenerator
        For more complex situations a filter approach is used. The lines of the request are passed in for modification and return Enabled when the generator is specified as a filter
        Specified by:
        filterHTTP in interface ClientIDGenerator
        Returns:
      • initialize

        public void initialize​(PluginInterface pi)
        Description copied from interface: Plugin
        This method is called when the Plugin is loaded by the client
        Specified by:
        initialize in interface Plugin
        Parameters:
        pi - the interface that the plugin must use to communicate with the client
      • initializeSupport

        private void initializeSupport​(PluginInterface pi)