public final class DhtSettings
extends java.lang.Object
| Constructor and Description |
|---|
DhtSettings() |
DhtSettings(dht_settings s) |
| Modifier and Type | Method and Description |
|---|---|
int |
blockRatelimit()
The max number of packets per second a DHT node is allowed to send
without getting banned.
|
void |
blockRatelimit(int value)
The max number of packets per second a DHT node is allowed to send
without getting banned.
|
int |
blockTimeout()
The number of seconds a DHT node is banned if it exceeds the rate
limit.
|
void |
blockTimeout(int value)
The number of seconds a DHT node is banned if it exceeds the rate
limit.
|
void |
getAggressiveLookups(boolean value)
slightly changes the lookup behavior in terms of how many outstanding
requests we keep.
|
int |
getMaxFailCount()
the maximum number of failed tries to contact a node before it is
removed from the routing table.
|
int |
getMaxTorrentSearchReply()
the max number of torrents to return in a torrent search query to the
DHT.
|
int |
getSearchBranching()
the number of concurrent search request the node will send when
announcing and refreshing the routing table.
|
boolean |
isAggressiveLookups()
slightly changes the lookup behavior in terms of how many outstanding
requests we keep.
|
boolean |
isEnforceNodeId()
when set, node's whose IDs that are not correctly generated based on
its external IP are ignored.
|
boolean |
isExtendedRoutingTable()
makes the first buckets in the DHT routing table fit 128, 64, 32 and
16 nodes respectively, as opposed to the standard size of 8.
|
boolean |
isIgnoreDarkInternet()
ignore DHT messages from parts of the internet we wouldn't expect to
see any traffic from
|
boolean |
isPrivacyLookups()
when set, perform lookups in a way that is slightly more expensive,
but which minimizes the amount of information leaked about you.
|
boolean |
isRestrictRoutingIPs()
determines if the routing table entries should restrict entries to one
per IP.
|
boolean |
isRestrictSearchIPs()
determines if DHT searches should prevent adding nodes with IPs with
very close CIDR distance.
|
int |
itemLifetime()
The number of seconds a immutable/mutable item will be expired.
|
void |
itemLifetime(int value)
The number of seconds a immutable/mutable item will be expired.
|
int |
maxDhtItems()
max number of items the DHT will store.
|
void |
maxDhtItems(int value)
max number of items the DHT will store.
|
int |
maxPeers()
The max number of peers to store per torrent (for the DHT).
|
void |
maxPeers(int value)
The max number of peers to store per torrent (for the DHT).
|
int |
maxPeersReply()
the maximum number of peers to send in a reply to ``get_peers``.
|
void |
maxPeersReply(int value)
the maximum number of peers to send in a reply to ``get_peers``.
|
int |
maxTorrents()
the total number of torrents to track from the DHT.
|
void |
maxTorrents(int value)
the total number of torrents to track from the DHT.
|
boolean |
readOnly()
When set, the other nodes won't keep this node in their routing
tables, it's meant for low-power and/or ephemeral devices that
cannot support the DHT, it is also useful for mobile devices which
are sensitive to network traffic and battery life.
|
void |
readOnly(boolean value)
When set, the other nodes won't keep this node in their routing
tables, it's meant for low-power and/or ephemeral devices that
cannot support the DHT, it is also useful for mobile devices which
are sensitive to network traffic and battery life.
|
void |
setEnforceNodeId(boolean value)
when set, node's whose IDs that are not correctly generated based on
its external IP are ignored.
|
void |
setExtendedRoutingTable(boolean value)
makes the first buckets in the DHT routing table fit 128, 64, 32 and
16 nodes respectively, as opposed to the standard size of 8.
|
void |
setIgnoreDarkInternet(boolean value)
ignore DHT messages from parts of the internet we wouldn't expect to
see any traffic from
|
void |
setMaxFailCount(int value)
the maximum number of failed tries to contact a node before it is
removed from the routing table.
|
void |
setMaxTorrentSearchReply(int value)
the max number of torrents to return in a torrent search query to the
DHT.
|
void |
setPrivacyLookups(boolean value)
when set, perform lookups in a way that is slightly more expensive,
but which minimizes the amount of information leaked about you.
|
void |
setRestrictRoutingIPs(boolean value)
determines if the routing table entries should restrict entries to one
per IP.
|
void |
setRestrictSearchIPs(boolean value)
determines if DHT searches should prevent adding nodes with IPs with
very close CIDR distance.
|
void |
setSearchBranching(int value)
the number of concurrent search request the node will send when
announcing and refreshing the routing table.
|
dht_settings |
swig() |
int |
uploadRateLimit()
The number of bytes per second (on average) the DHT is allowed to send.
|
void |
uploadRateLimit(int value)
The number of bytes per second (on average) the DHT is allowed to send.
|
public DhtSettings(dht_settings s)
public DhtSettings()
public dht_settings swig()
public int maxPeersReply()
public void maxPeersReply(int value)
value - public int getSearchBranching()
public void setSearchBranching(int value)
value - public int getMaxFailCount()
public void setMaxFailCount(int value)
value - public int maxTorrents()
public void maxTorrents(int value)
value - public int maxDhtItems()
public void maxDhtItems(int value)
value - public int maxPeers()
public void maxPeers(int value)
value - public int getMaxTorrentSearchReply()
public void setMaxTorrentSearchReply(int value)
value - public boolean isRestrictRoutingIPs()
when set, nodes whose IP address that's in the same /24 (or /64 for IPv6) range in the same routing table bucket. This is an attempt to mitigate node ID spoofing attacks also restrict any IP to only have a single entry in the whole routing table.
public void setRestrictRoutingIPs(boolean value)
when set, nodes whose IP address that's in the same /24 (or /64 for IPv6) range in the same routing table bucket. This is an attempt to mitigate node ID spoofing attacks also restrict any IP to only have a single entry in the whole routing table.
value - public boolean isRestrictSearchIPs()
public void setRestrictSearchIPs(boolean value)
value - public boolean isExtendedRoutingTable()
public void setExtendedRoutingTable(boolean value)
value - public boolean isAggressiveLookups()
public void getAggressiveLookups(boolean value)
value - public boolean isPrivacyLookups()
public void setPrivacyLookups(boolean value)
value - public boolean isEnforceNodeId()
public void setEnforceNodeId(boolean value)
value - public boolean isIgnoreDarkInternet()
public void setIgnoreDarkInternet(boolean value)
value - public int blockTimeout()
public void blockTimeout(int value)
value - public int blockRatelimit()
public void blockRatelimit(int value)
value - public boolean readOnly()
public void readOnly(boolean value)
value - public int itemLifetime()
public void itemLifetime(int value)
value - public int uploadRateLimit()
public void uploadRateLimit(int value)
value -