11月 242021
 

ESI(pesi)VMODVMOD

(xcounter)Github actionsdeb

varnish-modules

VMOD使.so

debrpm

https://github.com/xcir/vmod-packager

使docker, curl, jq使
xcir@build01:~/git/vmod-packager$ cd src
xcir@build01:~/git/vmod-packager/src$ git clone https://github.com/varnish/varnish-modules.git
xcir@build01:~/git/vmod-packager/src$ cd ..
xcir@build01:~/git/vmod-packager$ ./vmod-packager.sh -e 0.19 varnish-modules
...
##################################################
        docker image: vmod-packager/focal:7.0.0-1
                Dist: focal
     Varnish Version: 7.0.0
         Varnish VRT: 140
           VMOD name: varnish-modules
        VMOD Version: 140.0.19
              Status: SUCCESS

xcir@build01:~/git/vmod-packager$ ls pkgs/debs/varnish-modules/
varnish-modules_140.0.19~focal-1_amd64.build      varnish-modules_140.0.19~focal-1_amd64.changes  varnish-modules-dbgsym_140.0.19~focal-1_amd64.ddeb
varnish-modules_140.0.19~focal-1_amd64.buildinfo  varnish-modules_140.0.19~focal-1_amd64.deb



rpm
xcir@build01:~/git/vmod-packager$ ./vmod-packager.sh -d centos8 -e 0.19 varnish-modules
...
##################################################
        docker image: vmod-packager/centos8:7.0.0-1
                Dist: centos8
     Varnish Version: 7.0.0
         Varnish VRT: 140
           VMOD name: varnish-modules
        VMOD Version: 140.0.19
              Status: SUCCESS

xcir@build01:~/git/vmod-packager$ ls pkgs/rpms/varnish-modules/
varnish-modules-140.0.19-1.el8.src.rpm  varnish-modules-140.0.19-1.el8.x86_64.rpm





./autogen.sh(./bootstrap) + ./configure + make





libvdp-pesi
xcir@build01:~/git/vmod-packager$ cd src/
xcir@build01:~/git/vmod-packager/src$ git clone https://gitlab.com/uplex/varnish/libvdp-pesi.git

xcir@build01:~/git/vmod-packager/src$ cd libvdp-pesi/
xcir@build01:~/git/vmod-packager/src/libvdp-pesi$ git checkout -b 7.0 remotes/origin/7.0
xcir@build01:~/git/vmod-packager/src$ cat libvdp-pesi_init.sh 
#!/bin/sh

cp -rp ${VMP_ROOT_DIR}/src/m4 ${VMP_WORK_DIR}/src/m4

xcir@build01:~/git/vmod-packager/src$ cat libvdp-pesi_config.sh 
#!/bin/sh

./autogen.sh
./configure VARNISHSRC=/tmp/varnish/src

xcir@build01:~/git/vmod-packager$ ./vmod-packager.sh -f  src/libvdp-pesi
...

##################################################
        docker image: vmod-packager/focal:7.0.0-1
                Dist: focal
     Varnish Version: 7.0.0
         Varnish VRT: 140
           VMOD name: libvdp-pesi
        VMOD Version: 140.0.1
   Enable fixed mode
              Status: SUCCESS

xcir@build01:~/git/vmod-packager$ dpkg --info pkgs/debs/libvdp-pesi/libvdp-pesi_140.0.1~focal-1_amd64.deb 
 new Debian package, version 2.0.
 size 56760 bytes: control archive=816 bytes.
     309 bytes,    11 lines      control              
     711 bytes,    10 lines      md5sums              
 Package: libvdp-pesi
 Version: 140.0.1~focal-1
 Architecture: amd64
 Maintainer: libvdp-pesi <example@localhost>
 Installed-Size: 141
 Depends: libc6 (>= 2.14), varnish (= 7.0.0)
 Replaces: libvdp-pesi (<< 140)
 Section: web
 Priority: optional
 Homepage: https://github.com/xcir/
 Description: packed by vmod-packager

[VMOD]_init.sh
m4

使depends[VMOD]_env.sh

libvdp-pesiconfigurevarnish [VMOD]_config.sh

-f使libvdp-pesiVarnish

VMOD

src使vmodclone
for i in `find src/  -mindepth 1 -maxdepth 1 -type d` ; do echo $i;cd $i ;git pull; cd ..;cd .. ; done

./vmod-packager.sh -v 7.0.1 -t -e `date +%Y%m%d` `find src/  -mindepth 1 -maxdepth 1 -type d`

find pkgs/debs/ -type f -name *.deb|grep `date +%Y%m%d`| xargs -i cp -p {} [コピー先]



使README
使
VMOD




copyrightdescription
使

9月 252021
 

VarnishEnterpriseESIcommunity使UPLEX

ESI便


vmodVarnishVarnish

VarnishVarnish


OSUbuntu 20.04 LTS
Varnish7.0.0 (454733b82a3279a1603516b4f0a07f8bad4bcd55)
vmod_pesimaster (52cd44e3d8944825d1d84a01c70002a509048c74)

pesi使7.0

Varnishpesi
ubuntu@proxy:~/tmp$ ll
total 16
drwxrwxr-x  4 ubuntu ubuntu 4096 Sep 25 21:38 ./
drwxr-xr-x 12 ubuntu ubuntu 4096 Sep 25 21:37 ../
drwxrwxr-x  3 ubuntu ubuntu 4096 Sep 20 23:33 libvdp-pesi-master/
drwxrwxr-x 15 ubuntu ubuntu 4096 Sep 24 02:18 varnish-cache-master/



Varnishautogen.sh / configure / make
ubuntu@proxy:~/tmp$ cd varnish-cache-master/
ubuntu@proxy:~/tmp/varnish-cache-master$ ./autogen.sh
ubuntu@proxy:~/tmp/varnish-cache-master$ ./configure
ubuntu@proxy:~/tmp/varnish-cache-master$ make

make install

pesivarnishm4
ubuntu@proxy:~/tmp$ cd libvdp-pesi-master/
ubuntu@proxy:~/tmp/libvdp-pesi-master$ cp -rp ../varnish-cache-master/m4 ./

configure.acVarnishtrunkVarnish7.0.0
ubuntu@proxy:~/tmp/libvdp-pesi-master$ diff configure.ac ../org/configure.ac
56c56
< VARNISH_PREREQ([7.0.0])
---
> VARNISH_PREREQ([trunk])


src/Makefile.am1PR
ubuntu@proxy:~/tmp/libvdp-pesi-master$ diff src/Makefile.am ../org/src/Makefile.am
72,73d71
< vmod_pesi_debug.lo: vcc_pesi_debug_if.h
<


/


Varnish
ubuntu@proxy:~/tmp/libvdp-pesi-master$ ./autogen.sh
ubuntu@proxy:~/tmp/libvdp-pesi-master$ ./configure VARNISHSRC=/home/ubuntu/tmp/varnish-cache-master

ubuntu@proxy:~/tmp/libvdp-pesi-master$ make
ubuntu@proxy:~/tmp/libvdp-pesi-master$ make check
ubuntu@proxy:~/tmp/libvdp-pesi-master$ sudo make install



使


使
import pesi;

sub vcl_backend_response {
  set beresp.do_esi=true;
}

sub vcl_deliver{
  pesi.activate();
}

使 README 

ESIESI
$ cat esi1.html
<html>
<body>
        <esi:include src="./time.php?t=1&s=1"/>
        <esi:include src="./time.php?t=2&s=2"/>
        <esi:include src="./time.php?t=3&s=3"/>

</body>
</html>


$ cat time.php
<?php
$s=(int)$_GET['s'];
if($s >10)$s=10;
if($s==0) $s=1;
echo $_GET['t'];
echo "&nbsp;";
echo "start:".date(DateTime::ISO8601);
echo "&nbsp;";
sleep($s);
echo "end:".date(DateTime::ISO8601);
echo "<br>\r\n";


1,2,3PHPinclude

ESI


1+2+36

ESI


(esi1.html)ESIfetch

ESI

ESI

<html>
<body>
        <esi:include src="./time.php?t=C%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D1%26s%3D1%22%2F%3EC%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D1%26s%3D1%22%2F%3E&s=1"/>
        <esi:include src="./time.php?t=C%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D2%26s%3D2%22%2F%3EC%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D2%26s%3D2%22%2F%3E&s=2"/>
        <esi:include src="./time.php?t=C%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D3%26s%3D3%22%2F%3EC%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D3%26s%3D3%22%2F%3E&s=3"/>
</body>
</html>

url
C<esi:include src="./time.php?t=1&s=1"/>C<esi:include src="./time.php?t=1&s=1"/>
C<esi:include src="./time.php?t=2&s=2"/>C<esi:include src="./time.php?t=2&s=2"/>
C<esi:include src="./time.php?t=3&s=3"/>C<esi:include src="./time.php?t=3&s=3"/>

ESI2include
+ sleep=1
|+ sleep=1
|+ sleep=1
+ sleep=2
|+ sleep=2
|+ sleep=2
+ sleep=3
|+ sleep=3
|+ sleep=3

ESI

ESI


ESI

使


ESI

ESIESIESI(pesi.activate)

ESIESIpanicVarnishrestart

README


Varnish

9月 042019
 

Varnish6.0.4/6.2.1
(VSV00003/CVE-2019-15892)
VarnishHTTP(keep-alive)assertVarnish


 6.1.0~6.1.16.2.0
6.2.1
6.0.0~6.0.3
6.0.4

6.0.0(LTS4.1)assert

VCL


VCL


keepaliveConnection: Close


VCL
C使

6.2.0
6.1.1
6.0.3


(6.0.4)


6.2.16.0.46.0

std.ip


std.ipIP80p
80使


VMLVIVU-list使
9/15

4月 092018
 

Varnish6.0.0[changelog] [] [DL] [DL]
Fix
UnixDomainSocket(UDS)shard directorlazy
VCL(4.1)使


http/2
h2(#2623)
h2
h2使使Fix
h1h2使


OS
 RHEL7(CentOS7)
 Debian9
 Ubuntu16.04
Ubuntu14.04RHEL6
pkg-varnish-cache

VMOD
VMODVMOD


VSM5.2.0VSM/VUT
使

VCL


vclvcl 4.0;vcl 4.1;
4.0使4.1
UDS4.1使4.1
includeVCL

parent vcl ver child vcl ver result
4.0 4.0 OK
4.0 4.1 NG
4.1 4.0 OK
4.1 4.1 OK


VCL
default.vclincludedefault.vcl4.1
4.04.1

VCL


4.04.1

(4.0/4.1)


return(fetch)vcl_hit使
deplicated
return(miss)使

req.storage / hash_ignore_busy / hash_always_missclient

obj.storagevcl_hit/vcl_deliver

restart
req.restarts,xidreq
restart

vcl_recvreturn(restart)

(4.1)


backend.path
UDS使
.host

local.socket

-afoo=:81fooa0,a1

local.endpoint

-afoo=:81:81

sess.xid
ID(xid)
使req.xid/bereq.xid
KeepaliveHTTP/21

*   << Session  >> 433160262
-   Begin          sess 0 PROXY
-   SessOpen       ***
-   Proxy          ***
-   Link           req 423002616 rxreq
-   Link           req 423002617 rxreq
-   Link           req 423002618 rxreq
-   Link           req 423002619 rxreq
-   Link           req 423002620 rxreq
-   ReqAcct        72 22 94 1251 6 1257
-   End


HTTP/2.0
xid:433160262(sess.xid)xid:423002616423002620(req.xid)
sess.xidvcl使

resp.do_esi
beresp.do_esi
vcl_deliver/vcl_synth

(req|bereq|beresp).protoreadonly
.protoreadonly

req.esi
使beresp.do_esi使

beresp.storage_hint
beresp.storage


set beresp.storage_hint = "foo";




set beresp.storage = storage.foo;




beresp.backend.ip

IP0.0.0.0:0UDS

Unix Domain Socket(UDS)



CPSTLS

Nginx

LISTENUDS使
-a

-a /var/run/varnish-uds.sock,user=vcache,group=varnish,mode=666


proxy(PROXY)
Nginx666

Nginx

upstream backend {
    server unix:/var/run/varnish-uds.sock;
}
server {
        listen 80 default_server;
        listen [::]:80 default_server;
        location / {
            proxy_pass http://backend;
        }
...
}



LISTENUDS使VCL4.1
vcl(default.vcl)4.1include4.0 


When UDS listeners are in use, VCL >= 4.1 will be required for all VCL programs loaded by Varnish.

UDS使VCL4.1

UDSIPUDS0.0.0.0:0
client.identity(client.ip使)使backend
PROXY使

UDS使

Nginx

server {
  listen unix:/var/run/nginx-uds.sock;
  access_log off;
  root /var/www/html;
  index index.html index.htm index.nginx-debian.html;
}


Varnish

vcl 4.1;
backend default {
    .path = "/var/run/nginx-uds.sock";//絶対パス
}



1backend.pathvcl4.14.0
Listen使4.04.1

varnishncsa


-F
H2RxHdr H2RxBody H2TxHdr H2TxBody Debug HttpGarbage Hash使


esi_iovs
ESI使iovec
ESI使tunesystemcallwritev使調
workspace_thread調workspace_thread

h2
h2_header_table_size
h2_max_concurrent_streams
h2_initial_window_size
h2_max_frame_size
h2_max_header_list_size
h2RFC
h2_max_concurrent_streams100chrome1000

feature_bit(http_dete_postel)

rfc7231#section-7.1.1.2Date,Last-Modified,Expires

Fri, 2 Mar 2018 14:26:02 GMT  (まちがい)
Fri, 02 Mar 2018 14:26:02 GMT (ただしい)



-p feature=+http_dete_postel


cli_buffer


cache_hit_grace
grace

 

n_lru_limited
nuke_limit
LRU
VarnishNukenuke_limitNukeLimit
(50)50KB10MB
Limit(503)
(200)503
200ml

1nuke_limit

vmod_directors


shard director
shard_param
shard_param
shard(rampup)
使

sub vcl_init{
 new vd = directors.shard();
 vd.add_backend(hoge);
 new p = directors.shard_param();
 p.set(by=URL, warmup=0.7);
 vd.associate(p.use());
}




sub vcl_init{
 new vd = directors.shard();
 vd.add_backend(hoge);
 new p = directors.shard_param();
 p.set(by=URL, warmup=0.7);
}
sub vcl_backend_fetch{
 set bereq.backend=vd.backend(param=p);
}





(SHA256(default),CRC32,RS)
SHA256algalg
SHA256使
.reconfigure.key

resolve={now,lazy}

lazy
Director
fallbackdirectorfallback

probe healthcheck {
    .url ="/check";
    .timeout           = 1s;
    .window            = 4;
    .threshold         = 2;
    .interval          = 1s;
}
backend ws01  {.port="80";.host = "XX";.probe=healthcheck;}
backend ws02  {.port="80";.host = "YY";.probe=healthcheck;}

sub vcl_init {
 new sdp = directors.shard_param();
 sdp.set(warmup=0.5, healthy=ALL);

 new sd1 = directors.shard();
 sd1.associate(sdp.use());
 sd1.add_backend(ws01);
 sd1.reconfigure();

 new sd2 = directors.shard();
 sd2.associate(sdp.use());
 sd2.add_backend(ws02);
 sd2.reconfigure();

 new fb = directors.fallback();
 fb.add_backend(sd1.backend());//lazy
 fb.add_backend(sd2.backend());//lazy

}
sub vcl_recv {
 set req.backend_hint = fb.backend();
 return(pass);
}


shardshard_param

vmod_std


std.log/syslogworkspacefail

vmod_unix


vmod
user/group/uid/gid
使
man vmod_unix

sub vcl_recv {
      # Return "403 Forbidden" if the connected peer is
      # not running as the user "trusteduser".
      if (unix.user() != "trusteduser") {
              return( synth(403) );
      }

      # Require the connected peer to run in the group
      # "trustedgroup".
      if (unix.group() != "trustedgroup") {
              return( synth(403) );
      }

      # Require the connected peer to run under a specific numeric
      # user id.
      if (unix.uid() != 4711) {
              return( synth(403) );
      }

      # Require the connected peer to run under a numeric group id.
      if (unix.gid() != 815) {
              return( synth(403) );
      }
}



vmod_proxy


vmod
Proxy Protocol v2Type-Length-Value(TLV)Cipher使
Hitchalpn(PP2_TYPE_ALPN)使HAProxy使

TLVNLBVPCIDl
p-r
使

vcl 4.1;
import proxy;
import std;
sub vcl_recv{
 if(proxy.alpn() == "http/1.1"){
  //プロトコルはまぁreq.protoで取れるんで適切ではないかもですがサンプルとして
  ...
 }
}



VSL


ReqAcct
(chunked)OS使



max_restarts
return(restart)max_restrts1restartlimitmax_restartsreturn(restart)


11月 222017
 

Varnish
FeatureBugfix使
Varnish使pkg-varnishcache
使
weekly-build(rpm/deb)

https://packagecloud.io/varnishcache/varnish-weekly

branchtrunk
featureBugfix使
weeklybug-wash
featureskip


11月 162017
 

Varnish [changelog] [DL] [DL]


(VSV00002)


segfault/


VCL_backend_errorsynthetic(beresp.body)

file/persistent


vcl_backend_error
builtin.vcl
beresp.bodymemcpy(3)file/persistent
file/persistentpage-sizealign
memcpy(3)alignread(segfault)

vcl_backend_error
TTLtransient
malloc
transientTTL(ttl+grace+keep)shortlived
shortlivedhintdefault使
shortlived10VCL_backend_errorttl
使
waitinglistttl+grace+keep11sec
shortlived10secdefault storagefile/persistent使


Transientfile/persistent(ex -sTransient=file)
vcl_backend_error
Transientfile/persistent使

file/persistent
2
vcl_backend_errorTTL/grace/keepshortlivedvcl_backend_error
TTLshortlived(default 10sec)TTLshortlivedvcl_backend_error

syntheticvcl_synth
vcl_synthmemcpy(3)resp.bodylength(szl)


vcl_backend_errorfile/persistent使OK
vcl_backend_errorshortlivedshortlived12svcl_backend_errorTTL/grace/keep0
shortlived使TTL0



4.1.9/5.2.1

idle_timeout使(#2492)
4.1.9

5.2.0backport

bereq.is_bgfetch
req.ttl(#2422)



9月 242017
 

VarnishCache5.2.0 [changelog] [] [DL] [DL]
h2
vmod()
VMOD/TOOL

VSM


Varnish使VSM
VSM(VSL)(VSC)
VSMVUT
(Varnish UTilities:VUTVSM使log,ncsaAPI)


vago
python-varnishapi
varnishkafka


varnishstat(-j/-x)


muninVarnishvarnishstat
varnishstat-j(json)-x(xml)type, ident

~5.2.0(-j)
  "MAIN.uptime": {
    "description": "Child process uptime",
    "type": "MAIN", "flag": "c", "format": "d",
    "value": 4043809
  },

5.2.0~(-j)
  "MGT.uptime": {
    "description": "Management process uptime",
    "flag": "c", "format": "d",
    "value": 168192
  },



muninvarnish4

VSL


varnishlog
VSL

Hit, HitMiss, HitPass
VXIDTTL(Hitgrace/keepTTL)

SessOpen
3listen(-a)
-avarnish(a0)()

VCL_trace
VCLsource index
VCL

10 VCL_trace      c boot 4 0.23.3
                    |    | | |  |
                    |    | | |  +- VCL program line position
                    |    | | +---- VCL program line number
                    |    | +------ VCL program source index
                    |    +-------- VCL trace point index
                    +------------- VCL configname




# varnishadm vcl.show -v boot


VCL

// VCL.SHOW 0 939 /etc/varnish/default2.vcl
#           ↑ここがsource indexになる
#
# This is an example VCL file for Varnish.
...




 22 sub vcl_deliver{
 23   set resp.http.Hash = blob.encode(BASE64, blob=req.hash);
      ↑ここ


line:23 pos:3

varnishd


-lvsm
vsm


-a
listen(-a admin=127.0.0.1:88admin)
SessOpen

varnishstat


MAIN.s_req
MAIN.client_req

MAIN.req_dropped
h2

-N


varnishlog,stat,ncsa,hist-N

VCL


5.1VCL

[]server.identity
-n(def:)-i
-i(gethostname(3))

[](req|bereq).hash
BLOB
vmod_blobHEXBASE64

sub vcl_deliver {
    # base64形式でハッシュをレスポンスヘッダにセットする
    # Hash: ANTj5yFpZGjJsL0IaxEDGiG29h0fSZRvjywdvDkKihc=
    # こんな感じで出力される
    set resp.http.Hash = blob.encode(BASE64, blob=req.hash);
}


[]bereq.is_bgfetch
Varnish2fetchgracefetchbgfetch()
backend_fetchfetch
使
bgfetchtrue

[]req.backend_hint

req.backend_hintrestart

vmod_std


true/falsefile_exists
std.filereadstat

vmod_blob


vmod_blob
使VCLBLOBvmod使
vmod_blobencode/decode
base64/urlencode便
使

HEXfoo(666F6F00)blobSTRING

sub vcl_deliver{
  set resp.http.foo = blob.encode(IDENTITY, blob=blob.decode(HEX, encoded="666F6F00"));
}


IDENTITYHEX
blob.decode/encode使transcode


sub vcl_deliver{
  set resp.http.foo = blob.transcode(encoding=IDENTITY, decoding=HEX, encoded="666F6F00");
}







IDENTITY

BASE64

BASE64URL

BASE64URLNOPAD

HEX

URL


BASE64URL(URL)
IDENTITY使
666F6F00foo
HEX0x

使

vmod_purge


purge使
return(purge)
vcl_hit/vcl_miss

INT purge.hard()
return(purge)


INT purge.soft(DURATION ttl=0, DURATION grace=-1, DURATION keep=-1)
TTL0gracekeep(-1)
hard()soft(0,0,0)
TTL,grace,keep使

vmod_vtc


vmod便使
panic使


1
http/2

experimental使


20183
5.2
pr(UDS)


8月 032017
 

Varnish [changelog] [DL] [DL]

VCL
(VSV00001)



Transfer-Encoding: chunkedchunk-sizeMSBAssertVarnish(DoS)

$ sudo varnishadm panic.show|head
Panic at: Wed, 02 Aug 2017 16:45:40 GMT
Assert error in v1f_pull_chunked(), http1/cache_http1_vfp.c line 172:
  Condition((vfe->priv2) == 0) not true.
version = varnish-5.1.2 revision 6ece695, vrt api = 6.
0
...


Transfer-Encoding: chunked4.0.1
バージョン系 影響を受けるバージョン 修正バージョン パッケージDL先
4.0.x 4.0.1~4.0.4 4.0.5 link
4.1.x 4.1.0~4.1.7 4.1.8 link
5.0.x 5.0.0 5.1.3まで上げる必要があります link
5.1.x 5.1.0~5.1.2 5.1.3 link

4.0.03.0.x

(VCL)


VCL
chunked503
Transfer-Encoding
varnishlog -cq ReqHeader:Transfer-Encoding -i ReqMethod -i ReqURL
VCL

(VSV00001)
4.0.x
C
vcc_allow_inline_ctrue

-pvcc_allow_inline_c=true
varnishadm
varnishadm param.set vcc_allow_inline_c true

VCL

sub exploit_workaround_4_0 {
        # This needs to come before your vcl_recv function
        # The following code is only valid for Varnish Cache and
        # Varnish Cache Plus versions 4.0.x
        if (req.http.transfer-encoding ~ "(?i)chunked") {
                C{
                struct dummy_req {
                        unsigned magic;
                        int restarts;
                        int esi_level;
                        int disable_esi;
                        char hash_ignore_busy;
                        char hash_always_miss;
                        void *sp;
                        void *wrk;
                        int req_step;
                        struct {
                                void *a;
                                void *b;
                        };
                        int req_body_status;
                };
                ((struct dummy_req *)ctx->req)->req_body_status = 6;
                }C

                return (synth(503, "Bad request"));
        }
}

sub vcl_recv {
        # Call this early in your vcl_recv function
        call exploit_workaround_4_0;
}


4.1.x5.0.0
C4.0.x

sub exploit_workaround_4_1 {
        # This needs to come before your vcl_recv function
        # The following code is only valid for Varnish Cache and
        # Varnish Cache Plus versions 4.1.x and 5.0.0
        if (req.http.transfer-encoding ~ "(?i)chunked") {
                C{
                struct dummy_req {
                        unsigned magic;
                        int step;
                        int req_body_status;
                };
                ((struct dummy_req *)ctx->req)->req_body_status = 5;
                }C

                return (synth(503, "Bad request"));
        }
}

sub vcl_recv {
        # Call this early in your vcl_recv function
        call exploit_workaround_4_1;
}


5.1.x
C使

sub vcl_recv {
        if (req.http.transfer-encoding ~ "(?i)chunked") {
                return (fail);
        }
}


使
VIVU  Very Important Varnish UsersVML(1000/)
Varnish使


8月 022017
 

4.14.1.7 [changelog] [] [DL] [DL]

stat


varnishncsaLogFormat%{X}xrecord-prefix(#2077)

%{VSL:tag[field]}x
TimestampProcessFetch(Start)
record-prefixvsl-query(level)

$ sudo varnishncsa -F "fetch:%{VSL:timestamp:fetch[2]}x process:%{VSL:timestamp:process[2]}x"
fetch:0.000377 process:0.000392


workspaceworkspace(#2219)

varnishstatglob(#2022,2118,2320)
 -fstat
-1

nuke_limit(#1764)

Reason-Phrase(#2069)



4月 072017
 

5.1.2
5.1.14

1HTTP/2
 [changelog] [] [DL] [DL]
 


std.collect
std.collect1[, ]
Cookie[; ]
[, ]使
Cookie使

std.collect(req.http.cookie, "; ");


 

(h2)


#2295 使
#2207 #2278 PROXY使
 

(h2)


#2291 #2300 Cookie1
#2247 Content-LengthTransfer-Encoding: chunked
2VCL

#2238 ReqAcctvarnishncsa0
varnishncsa%b0

assert

Varnishhttp/2


5.1.1使
experimental
Simon


#2268 PRIV_TASK/TOPvmod
PRIV_TASK/TOP
PRIVassert
使vmod(:vmod_cookie)
使vccPRIV_TASKPRIV_TOP

使h/1
h2h1使
VPS



パラメータ
thread_pools スレッドプール数
thread_pool_min スレッドプール毎の最低スレッド数
thread_pool_max スレッドプール毎の最大スレッド数
thread_queue_limit スレッド枯渇時のキュー長
カウンタ
MAIN.threads_limited ドロップされたセッション数
MAIN.sess_dropped ドロップされたセッション数
MAIN.sess_queued キューイングされたセッション数
MAIN.threads 現在のスレッド数

thread_pools * thread_pool_minthread_pools * thread_pool_max
MAIN.sess_droppedMAIN.sess_queued
thread_pool_min
MAIN.threadsdropped/queued調
queuedthread_pool_minthread_queue_limit
使
調

HTTP/2使pkg-varnishcache使

hitch1.4.4使
hitchreload(HUP)
ocsp staplingreload(#167)


ocsp-dir = ""


off


Varnishhttp/2
VarnishVML