Skip to content
  • David Goulet's avatar
    hs: Limit the amount of relayed INTRODUCE2 · 9f738be8
    David Goulet authored
    
    
    This commit add the hs_dos.{c|h} file that has the purpose of having the
    anti-DoS code for onion services.
    
    At this commit, it only has one which is a function that decides if an
    INTRODUCE2 can be sent on the given introduction service circuit (S<->IP)
    using a simple token bucket.
    
    The rate per second is 25 and allowed burst to 200.
    
    Basic defenses on #15516.
    
    Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
    9f738be8