varnish / libvmod-shield Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
I am getting this error
Package varnishapi was not found in the pkg-config search path.
Perhaps you should add the directory containing `varnishapi.pc'
to the PKG_CONFIG_PATH environment variable
I am testing this now with varnish 3 and 4, is it really this simple to implement. It seems too easy as if I'm missing something.
import shield;
sub vcl_recv {
if (req.url ~ "i-am-an-attacker") {
shield.conn_reset();
}
}
Hi Lasse,
I'm getting a configure error when trying to compile libvmod-shield with Varnish 4 -- is this something that needs to be updated in the configure script, or something on my system that I need to do differently?
Thanks!
-Jeff
checking for /Users/jeff/test/varnish-4.0.0/include/varnishapi.h... no
configure: error: in `/Users/jeff/test/libvmod-shield-master':
configure: error: "/Users/jeff/test/varnish-4.0.0" is not a Varnish source directory
ls /Users/jeff/test/varnish-4.0.0/include
Makefile vcli_common.h vqueue.h
Makefile.am vcli_priv.h vre.h
Makefile.in vcli_serve.h vrnd.h
binary_heap.h vcs.h vrt.h
compat vcs_version.h vrt_obj.h
flopen.h vct.h vsa.h
libvcc.h vdef.h vsb.h
miniobj.h vend.h vsha256.h
persistent.h vev.h vss.h
tbl vfil.h vsub.h
vapi vin.h vtcp.h
vas.h vlu.h vtim.h
vav.h vmb.h vtree.h
vbm.h vmod_abi.h vut.h
vcl.h vnum.h vut_options.h
vcli.h vpf.h
I tried to port this vmod, looking at examples from other vmods, varnish.m4
file is found, but I get a different error:
make all-recursive
make[1]: Entering directory `/home/r/libvmod-shield'
Making all in src
make[2]: Entering directory `/home/r/libvmod-shield/src'
make[2]: *** No rule to make target `/lib/libvmod_std/vmod.py', needed by `vcc_if.c'. Stop.
make[2]: Leaving directory `/home/r/libvmod-shield/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/r/libvmod-shield'
make: *** [all] Error 2
I have this working, for sub vcl_receive, do I need equivalents in vcl miss or anywhere else to be effective against DDoS?
sub vcl_recv {
# Check requests per second using vsthrottle
if (vsthrottle.is_denied(client.identity, 15, 10s)) {
# Client has exceeded 15 reqs per 10s, reset connection using shield
shield.conn_reset();
return (synth(429, "Too Many Requests"));
}
}
Hello,
This mod what I wanted because there is no disconnect action on the varnish.
I installed varnish-cache 4.1.1
But I can't use this.
Do you have any plan to support 4.x or 5.x?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.