Class PeerClassifier
java.lang.Object
com.biglybt.core.peermanager.utils.PeerClassifier
Handles peer client identification and banning.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
fullySupportsFE
(String client_description) static String
getClientDescription
(byte[] peer_id, String net) Get a client description (name and version) from the given peerID byte array.static String
getPrintablePeerID
(byte[] peer_id) Get a printable representation of the given raw peerID byte array, i.e.static boolean
isAzureusIP
(String ip) This only works for ones that have been explicitly set as AZ ipsstatic boolean
isClientTypeAllowed
(String client_description) Check if the client type is allowed to connect.static void
setAzureusIP
(String ip) static boolean
SYNC call!
-
Field Details
-
CACHE_LOGIC
- See Also:
-
platform_ips
-
-
Constructor Details
-
PeerClassifier
public PeerClassifier()
-
-
Method Details
-
getClientDescription
Get a client description (name and version) from the given peerID byte array.- Parameters:
peer_id
- peerID sent in handshake- Returns:
- description
-
getPrintablePeerID
Get a printable representation of the given raw peerID byte array, i.e. filter out the first 32 non-printing ascii chars.- Parameters:
peer_id
- peerID sent in handshake- Returns:
- printable peerID
-
isClientTypeAllowed
Check if the client type is allowed to connect.- Parameters:
client_description
- given by getClientDescription- Returns:
- true if allowed, false if banned
-
fullySupportsFE
-
isAzureusIP
This only works for ones that have been explicitly set as AZ ips- Parameters:
ip
-- Returns:
-
setAzureusIP
-
testIfAzureusIP
SYNC call!- Parameters:
ip
-- Returns:
-