AutoNATv2Settings class
Settings for AutoNAT v2
Constructors
- AutoNATv2Settings.new({bool allowPrivateAddrs = false, int serverRPM = 60, int serverPerPeerRPM = 12, int serverDialDataRPM = 12, required DataRequestPolicyFunc dataRequestPolicy, DateTime now()?, Duration amplificationAttackPreventionDialWait = const Duration(seconds: 3), MetricsTracer? metricsTracer})
Properties
- allowPrivateAddrs → bool
-
Whether to allow private addresses
final
- amplificationAttackPreventionDialWait → Duration
-
Wait time for dial-back to prevent amplification attacks
final
- dataRequestPolicy → DataRequestPolicyFunc
-
Policy for determining when to request dial data
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- metricsTracer → MetricsTracer?
-
Metrics tracer
final
- now → DateTime Function()
-
Function for getting the current time (for testing)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverDialDataRPM → int
-
Rate limit for dial data requests (requests per minute)
final
- serverPerPeerRPM → int
-
Per-peer rate limit (requests per minute)
final
- serverRPM → int
-
Global rate limit (requests per minute)
final
Methods
-
copyWith(
{bool? allowPrivateAddrs, int? serverRPM, int? serverPerPeerRPM, int? serverDialDataRPM, DataRequestPolicyFunc? dataRequestPolicy, DateTime now()?, Duration? amplificationAttackPreventionDialWait, MetricsTracer? metricsTracer}) → AutoNATv2Settings - Create a copy of this settings object with the given changes
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited