Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.i2p.router.tunnel.pool
Class ParticipatingThrottler

    java.lang.Object
      net.i2p.router.tunnel.pool.ParticipatingThrottler

     class ParticipatingThrottler

extends Object

Count how often we have accepted a tunnel with the peer as the previous or next hop. We limit each peer to a percentage of all participating tunnels, subject to minimum and maximum values for the limit. This offers basic protection against simple attacks but is not a complete solution, as by design, we don't know the originator of a tunnel request. This also effectively limits the number of tunnels between any given pair of routers, which probably isn't a bad thing. Note that the actual limits will be higher than specified by up to 1 / LIFETIME_PORTION because the counter window resets. Note that the counts are of previous + next hops, so the total will be higher than the participating tunnel count, and will also grow as the network uses more 3-hop tunnels.

Since:
  0.8.4

Constructor Summary
`ParticipatingThrottler(RouterContext ctx)`

Method Summary
`(package private) boolean` | `shouldThrottle(Hash h)` increments before checking

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ParticipatingThrottler

    ParticipatingThrottler(RouterContext ctx)

Method Detail

### shouldThrottle

    boolean shouldThrottle(Hash h)

  increments before checking

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD