net.i2p.router.tunnel.pool

## Class IdleTunnelMonitor

- java.lang.Object
- - net.i2p.router.tunnel.pool.IdleTunnelMonitor

- All Implemented Interfaces:
    SimpleTimer.TimedEvent

      class IdleTunnelMonitor
      extends Object
      implements SimpleTimer.TimedEvent

  Monitors transit tunnels for idle/abusive behavior and detects Sybil attacks. This class periodically scans participating tunnels and: 1. Drops tunnels with no/low traffic after detection period (both messages AND bytes) 2. Detects multiple router identities on same IP with low traffic (Sybils) 3. Bans peers for repeated idle tunnel offenses or Sybil behavior Configurable properties: - router.idleTunnelDetectionPeriod: Time before checking for idle (default: 30000ms) - router.idleTunnelMinMessages: Minimum messages to not be considered idle (default: 2) - router.idleTunnelMinBytes: Minimum bytes to not be considered idle (default: 2048) - router.idleTunnelScanInterval: How often to scan (default: 30000ms) - router.sybilMinIdentities: Minimum identities on same IP to trigger Sybil check (default: 2) - router.sybilMinIdleTunnels: Minimum idle tunnels for Sybil ban (default: 10)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IdleTunnelMonitor(RouterContext ctx)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `timeReached()` the time requested has been reached (this call should NOT block, otherwise the whole SimpleTimer gets backed up)

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IdleTunnelMonitor

          IdleTunnelMonitor(RouterContext ctx)

  - ### Method Detail

    - #### timeReached

          public void timeReached()

      Description copied from interface: `SimpleTimer.TimedEvent`
      the time requested has been reached (this call should NOT block, otherwise the whole SimpleTimer gets backed up)
      Specified by:
        `timeReached` in interface `SimpleTimer.TimedEvent`