Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

108 lines (70 sloc) 1.92 kb

vmod_whatever

Varnish Whatever Module

Manual section: 3
Author: Sylvain Munaut
Date: 2012-11-19
Version: 0.1

SYNOPSIS

import whatever;

whatever.req_update_client_ip();

DESCRIPTION

Varnish Module (vmod) with various helper functions used internally by Whatever s.a.

FUNCTIONS

Example VCL:

import whatever;

sub vcl_recv {
        whatever.req_update_client_ip();
}

req_update_client_ip

Prototype
whatever.req_update_client_ip()
Returns
void
Description
Update the req.client.ip field by analyzing the X-Forwarded-For or X-Real-IP field. Works for both IPv4 and IPv6.
Example
whatever.req_update_client_ip()

INSTALLATION

Installation requires the Varnish source tree (only the source matching the binary installation).

  1. ./autogen.sh (for git-installation)
  2. ./configure VARNISHSRC=/path/to/your/varnish/source/varnish-cache
  3. make
  4. make install (may require root: sudo make install)
  5. make check (Optional for regression tests)

VARNISHSRCDIR is the directory of the Varnish source tree for which to compile your vmod. Both the VARNISHSRCDIR and VARNISHSRCDIR/include will be added to the include search paths for your module.

Optionally you can also set the vmod install dir by adding VMODDIR=DIR (defaults to the pkg-config discovered directory from your Varnish installation).

ACKNOWLEDGEMENTS

VMod skeleton taken from the libvmod-header module.

HISTORY

Version 0.1: Initial version

BUGS

None ?

SEE ALSO

COPYRIGHT

This document is licensed under the same license as the libvmod-whatever project. See LICENSE for details.

  • Copyright (c) 2012 Whatever s.a.
Jump to Line
Something went wrong with that request. Please try again.