Package com.biglybt.pif.clientid
Interface ClientIDGenerator
- All Known Implementing Classes:
ClientIDPlugin
public interface ClientIDGenerator
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionString[]
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)
-
Field Details
-
PR_URL
- See Also:
-
PR_PROXY
- See Also:
-
PR_RAW_REQUEST
- See Also:
-
PR_USER_AGENT
- See Also:
-
PR_SNI_HACK
- See Also:
-
PR_CLIENT_NAME
- See Also:
-
PR_MESSAGING_MODE
- See Also:
-
-
Method Details
-
generatePeerID
generate a peer id - must be exactly 20 bytes- Parameters:
for_tracker
- generator to give to tracker or for peer-peer commstorrent
-- Returns:
- Throws:
ClientIDException
-
generateHTTPProperties
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- Parameters:
properties
-torrent
-- Throws:
ClientIDException
-
filterHTTP
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- Parameters:
lines_in
-- Returns:
- Throws:
ClientIDException
-
getProperty
-