Class ClientIDPlugin
java.lang.Object
com.biglybt.pifimpl.local.clientid.ClientIDPlugin
- All Implemented Interfaces:
ClientIDGenerator, Plugin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate Coreprivate static booleanFields inherited from interface ClientIDGenerator
PR_CLIENT_NAME, PR_MESSAGING_MODE, PR_PROXY, PR_RAW_REQUEST, PR_SNI_HACK, PR_URL, PR_USER_AGENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoHTTPProperties(Properties properties) String[]filterHTTP(byte[] hash, String[] lines_in) For more complex situations a filter approach is used.voidgenerateHTTPProperties(byte[] hash, Properties properties) 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 filterbyte[]generatePeerID(byte[] hash, boolean for_tracker) generate a peer id - must be exactly 20 bytesgetProperty(byte[] hash, String property_name) voidinitialize(Core _core) voidThis method is called when the Plugin is loaded by the clientprivate void
-
Field Details
-
BIGLY_NAME
- See Also:
-
BIGLY_VERSION
- See Also:
-
BIGLYBT_CLIENT_NAME
- See Also:
-
BIGLYBT_CLIENT_NAME_SM
- See Also:
-
send_os
private static boolean send_os -
core
-
-
Constructor Details
-
ClientIDPlugin
public ClientIDPlugin()
-
-
Method Details
-
getInitialProperties
- Specified by:
getInitialPropertiesin interfacePlugin
-
initialize
-
generatePeerID
public byte[] generatePeerID(byte[] hash, boolean for_tracker) Description copied from interface:ClientIDGeneratorgenerate a peer id - must be exactly 20 bytes- Specified by:
generatePeerIDin interfaceClientIDGenerator- Parameters:
for_tracker- generator to give to tracker or for peer-peer comms- Returns:
-
getProperty
- Specified by:
getPropertyin interfaceClientIDGenerator
-
doHTTPProperties
-
generateHTTPProperties
Description copied from interface:ClientIDGeneratorgenerate 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:
generateHTTPPropertiesin interfaceClientIDGenerator- Parameters:
properties-
-
filterHTTP
Description copied from interface:ClientIDGeneratorFor 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:
filterHTTPin interfaceClientIDGenerator- Parameters:
lines_in-- Returns:
-
initialize
Description copied from interface:PluginThis method is called when the Plugin is loaded by the client- Specified by:
initializein interfacePlugin- Parameters:
pi- the interface that the plugin must use to communicate with the client
-
initializeSupport
-