Class ClientIDPlugin
java.lang.Object
com.biglybt.pifimpl.local.clientid.ClientIDPlugin
- All Implemented Interfaces:
ClientIDGenerator
,Plugin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
private Core
private static boolean
Fields inherited from interface com.biglybt.pif.clientid.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 void
doHTTPProperties
(Properties properties) String[]
filterHTTP
(byte[] hash, String[] lines_in) For more complex situations a filter approach is used.void
generateHTTPProperties
(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) void
initialize
(Core _core) void
This 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:
getInitialProperties
in interfacePlugin
-
initialize
-
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 interfaceClientIDGenerator
for_tracker
- generator to give to tracker or for peer-peer comms- Returns:
-
getProperty
- Specified by:
getProperty
in interfaceClientIDGenerator
-
doHTTPProperties
-
generateHTTPProperties
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 interfaceClientIDGenerator
-
filterHTTP
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 interfaceClientIDGenerator
- Returns:
-
initialize
Description copied from interface:Plugin
This method is called when the Plugin is loaded by the client- Specified by:
initialize
in interfacePlugin
- Parameters:
pi
- the interface that the plugin must use to communicate with the client
-
initializeSupport
-