Nice! -- Guillaume Quintard
On Fri, Nov 30, 2018 at 12:14 AM kokoniimasu <[email protected]> wrote: > Hi, All. > > I created a vmod_xcounter that can easily add counters. > I think it can use in various situations. > > I'm using vsthrottle together. > > - vcl > > vcl 4.0; > import xcounter; > import vsthrottle; > > sub vcl_init { > new atk_login = xcounter.vsc(hidevclname=1, groupname="attack."); > ... > } > > sub vcl_recv { > ... > if(req.method == "POST" && req.url ~ ****){ > if(vsthrottle.is_denied("LOGIN:" + req.http.****, **, 60s)) { > atk_login.incr(1); > return (synth(429, "Too Many Requests")); > } > ... > } > ... > } > > - output > > https://raw.githubusercontent.com/xcir/libvmod-xcounter/master/res/varnishstat.png > > > https://github.com/xcir/libvmod-xcounter > > I hope that this vmod is of help to you. > > -- > Shohei Tanaka(@xcir) > http://blog.xcir.net/ (JP) > _______________________________________________ > varnish-misc mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
