• Home
  • Raw
  • Download

Lines Matching +full:ipv4 +full:- +full:no +full:- +full:config +full:- +full:for +full:- +full:cpp

1 nghttp2 - HTTP/2 C Library
9 proxy. We have also developed load test and benchmarking tools for
15 ------------------
19 <https://tools.ietf.org/html/rfc7541>`_ HPACK - Header Compression for
24 (https://github.com/tatsuhiro-t/spdylay) project.
27 ------------------
34 This endpoint supports ``h2``, ``h2-16``, ``h2-14``, and
35 ``http/1.1`` via ALPN and requires TLSv1.2 for HTTP/2
45 ------------
49 * pkg-config >= 0.20
53 * sphinx (http://sphinx-doc.org/)
56 all you need. Use ``--enable-lib-only`` to ensure that only
65 aws-lc >= 1.19.0; or BoringSSL
68 * libc-ares >= 1.7.5
70 To enable ``-a`` option (getting linked assets from the downloaded
78 * libsystemd-dev >= 209
86 * libevent-openssl >= 2.0.8
98 For BoringSSL or aws-lc build, to enable :rfc:`8879` TLS Certificate
101 * libbrotli-dev >= 1.0.9
103 To enable mruby support for nghttpx, `mruby
106 mrgems, mruby is managed by git submodule under third-party/mruby
107 directory. Currently, mruby support for nghttpx is disabled by
108 default. To enable mruby support, use ``--with-mruby`` configure
109 option. Note that at the time of this writing, libmruby-dev and mruby
110 packages in Debian/Ubuntu are not usable for nghttp2, since they do
118 privilege separation engine for OpenSSL. In short, it minimizes the
121 ``--with-neverbleed`` configure option.
123 To enable the experimental HTTP/3 support for h2load and nghttpx, the
128 wolfSSL; or LibreSSL (does not support 0RTT); or aws-lc; or
134 Use ``--enable-http3`` configure option to enable HTTP/3 feature for
138 datagram to a correct socket for nghttpx, the following libraries are
141 * libbpf-dev >= 0.7.0
143 Use ``--with-libbpf`` configure option to build eBPF program.
144 libelf-dev is needed to build libbpf.
146 For Ubuntu 20.04, you can build libbpf from `the source code
148 program for reloading its configuration and hot swapping its
158 To enable mruby support in nghttpx, and use ``--with-mruby``
163 Mac OS X users may need the ``--disable-threads`` configure option to
164 disable multi-threading in nghttpd, nghttpx and h2load to prevent
171 and h2load), you must use the ``--enable-app`` configure option and
174 applications, and enable ``--enable-app`` automatically, so you
176 applications were not built, then using ``--enable-app`` may find
181 In order to detect third party libraries, pkg-config is used
182 (however we don't use pkg-config for some libraries (e.g., libev)).
183 By default, pkg-config searches ``*.pc`` file in the standard
189 .. code-block:: text
193 For pkg-config managed libraries, ``*_CFLAG`` and ``*_LIBS``
195 ``OPENSSL_LIBS``). Specifying non-empty string to these variables
196 completely overrides pkg-config. In other words, if they are
197 specified, pkg-config is not used for detection, and user is
198 responsible to specify the correct values to these variables. For
199 complete list of these variables, run ``./configure -h``.
204 .. code-block:: text
206 sudo apt-get install g++ clang make binutils autoconf automake \
207 autotools-dev libtool pkg-config \
208 zlib1g-dev libssl-dev libxml2-dev libev-dev \
209 libevent-dev libjansson-dev \
210 libc-ares-dev libjemalloc-dev libsystemd-dev \
211 ruby-dev bison libelf-dev
214 -----------------------------------------
225 .. code-block:: text
227 $ tar xf nghttp2-X.Y.Z.tar.bz2
228 $ cd nghttp2-X.Y.Z
233 -----------------
238 .. code-block:: text
240 $ git submodule update --init
241 $ autoreconf -i
247 Notes for building on Windows (MSVC)
248 ------------------------------------
252 <http://landinghub.visualstudio.com/visual-cpp-build-tools>`_ works
255 1. Install cmake for windows
258 3. Then run ``cmake --build`` to build library.
262 No bundled applications are compiled.
264 Notes for building on Windows (Mingw/Cygwin)
265 --------------------------------------------
268 ``libnghttp2-X.dll`` and ``libnghttp2.a``.
282 .. code-block:: text
284 $ export CFLAGS="-U__STRICT_ANSI__ -I$libev_PREFIX/include -L$libev_PREFIX/lib"
293 Notes for installation on Linux systems
294 --------------------------------------------
297 .. code-block:: text
299 …oading shared libraries: libnghttp2.so.14: cannot open shared object file: No such file or directo…
306 --------------------------
314 .. code-block:: text
326 ---------------------------------------
329 configure script with ``--enable-http3``.
331 For nghttpx to reload configurations and swapping its executable while
333 the configure script with ``--enable-http3 --with-libbpf`` to build
335 ``--frontend-quic-secret-file`` in order to keep the existing
340 Build aws-lc:
342 .. code-block:: text
344 $ git clone --depth 1 -b v1.36.1 https://github.com/aws/aws-lc
345 $ cd aws-lc
346 $ cmake -B build -DDISABLE_GO=ON --install-prefix=$PWD/opt
347 $ make -j$(nproc) -C build
348 $ cmake --install build
353 .. code-block:: text
355 $ git clone --depth 1 -b v1.6.0 https://github.com/ngtcp2/nghttp3
357 $ git submodule update --init --depth 1
358 $ autoreconf -i
359 $ ./configure --prefix=$PWD/build --enable-lib-only
360 $ make -j$(nproc)
366 .. code-block:: text
368 $ git clone --depth 1 -b v1.8.1 https://github.com/ngtcp2/ngtcp2
370 $ git submodule update --init --depth 1
371 $ autoreconf -i
372 $ ./configure --prefix=$PWD/build --enable-lib-only --with-boringssl \
373 BORINGSSL_CFLAGS="-I$PWD/../aws-lc/opt/include" \
374 BORINGSSL_LIBS="-L$PWD/../aws-lc/opt/lib -lssl -lcrypto"
375 $ make -j$(nproc)
379 If your Linux distribution does not have libbpf-dev >= 0.7.0, build
382 .. code-block:: text
384 $ git clone --depth 1 -b v1.4.6 https://github.com/libbpf/libbpf
386 $ PREFIX=$PWD/build make -C src install
391 .. code-block:: text
395 $ git submodule update --init
396 $ autoreconf -i
397 $ ./configure --with-mruby --enable-http3 --with-libbpf \
398 CC=clang-15 CXX=clang++-15 \
399 …PKG_CONFIG_PATH="$PWD/../aws-lc/opt/lib/pkgconfig:$PWD/../nghttp3/build/lib/pkgconfig:$PWD/../ngtc…
400 LDFLAGS="$LDFLAGS -Wl,-rpath,$PWD/../aws-lc/opt/lib -Wl,-rpath,$PWD/../libbpf/build/lib64"
401 $ make -j$(nproc)
404 directory. Pass ``--quic-bpf-program-file=bpf/reuseport_kern.o``
405 option to nghttpx to load it. See also `HTTP/3 section in nghttpx -
406 HTTP/2 proxy - HOW-TO
407 <https://nghttp2.org/documentation/nghttpx-howto.html#http-3>`_.
410 ----------
415 -----------------
417 We have the integration tests for the nghttpx proxy server. The tests are
423 * https://github.com/tatsuhiro-t/go-nghttp2
428 ``integration-tests`` directory:
430 .. code-block:: text
437 ---------------------------------
445 Previously we announced ``h2-14`` and ``h2c-14``. v1.0.0 implements
454 recompiling is enough for this change.
462 followed by SETTINGS frame. For clarification, we call "client magic"
463 for this 24 bytes byte string and updated API.
490 Remove HTTP Alternative Services (Alt-Svc) related code
493 Alt-Svc specification is not finalized yet. To make our API stable,
494 we have decided to remove all Alt-Svc related API from nghttp2.
499 We have already removed the functionality of Alt-Svc in v0.7 series
535 ---------------------------------
539 nghttp - client
545 It has verbose output mode for framing information. Here is sample
548 .. code-block:: text
550 $ nghttp -nv https://nghttp2.org
583 accept-encoding: gzip, deflate
584 user-agent: nghttp2/1.0.1-DEV
592 [ 0.221] recv (stream_id=13) accept-encoding: gzip, deflate
593 [ 0.222] recv (stream_id=13) user-agent: nghttp2/1.0.1-DEV
599 [ 0.222] recv (stream_id=13) content-type: text/html
600 [ 0.222] recv (stream_id=13) last-modified: Fri, 15 May 2015 15:38:06 GMT
601 [ 0.222] recv (stream_id=13) etag: W/"555612de-19f6"
603 [ 0.222] recv (stream_id=13) content-encoding: gzip
604 [ 0.222] recv (stream_id=13) server: nghttpx nghttp2/1.0.1-DEV
606 [ 0.222] recv (stream_id=13) strict-transport-security: max-age=31536000
615 [ 0.222] recv (stream_id=2) content-type: text/css
616 [ 0.222] recv (stream_id=2) last-modified: Fri, 15 May 2015 15:38:06 GMT
617 [ 0.222] recv (stream_id=2) etag: W/"555612de-9845"
618 [ 0.222] recv (stream_id=2) content-encoding: gzip
619 [ 0.222] recv (stream_id=2) server: nghttpx nghttp2/1.0.1-DEV
621 [ 0.222] recv (stream_id=2) strict-transport-security: max-age=31536000
633 .. code-block:: text
635 $ nghttp -nvu http://nghttp2.org
640 Connection: Upgrade, HTTP2-Settings
642 HTTP2-Settings: AAMAAABkAAQAAP__
644 User-Agent: nghttp2/1.0.1-DEV
681 [ 0.019] recv (stream_id=1) user-agent: nghttp2/1.0.1-DEV
687 [ 0.019] recv (stream_id=1) content-type: text/html
688 [ 0.019] recv (stream_id=1) content-length: 6646
689 [ 0.019] recv (stream_id=1) last-modified: Fri, 15 May 2015 15:38:06 GMT
690 [ 0.019] recv (stream_id=1) etag: "555612de-19f6"
692 [ 0.019] recv (stream_id=1) accept-ranges: bytes
693 [ 0.019] recv (stream_id=1) server: nghttpx nghttp2/1.0.1-DEV
703 [ 0.019] recv (stream_id=2) content-type: text/css
704 [ 0.019] recv (stream_id=2) content-length: 38981
705 [ 0.019] recv (stream_id=2) last-modified: Fri, 15 May 2015 15:38:06 GMT
706 [ 0.019] recv (stream_id=2) etag: "555612de-9845"
707 [ 0.019] recv (stream_id=2) accept-ranges: bytes
708 [ 0.019] recv (stream_id=2) server: nghttpx nghttp2/1.0.1-DEV
728 Using the ``-s`` option, ``nghttp`` prints out some timing information for
731 .. code-block:: text
733 $ nghttp -nas https://nghttp2.org/
742 process: responseEnd - requestStart
748 see http://www.w3.org/TR/resource-timing/#processing-model
756 15 +78.12ms +38.66ms 39.46ms 200 3K /javascripts/modernizr-2.0.js
758 Using the ``-r`` option, ``nghttp`` writes more detailed timing data to
761 nghttpd - server
764 ``nghttpd`` is a multi-threaded static web server.
766 By default, it uses SSL/TLS connection. Use ``--no-tls`` option to
770 connections. No HTTP Upgrade is supported.
772 The ``-p`` option allows users to configure server push.
774 Just like ``nghttp``, it has a verbose output mode for framing
777 .. code-block:: text
779 $ nghttpd --no-tls -v 8080
780 IPv4: listen 0.0.0.0:8080
807 [id=1] [ 1.521] recv (stream_id=13) accept-encoding: gzip, deflate
808 [id=1] [ 1.521] recv (stream_id=13) user-agent: nghttp2/1.0.0-DEV
821 server: nghttpd nghttp2/1.0.0-DEV
822 content-length: 10
823 cache-control: max-age=3600
825 last-modified: Tue, 30 Sep 2014 12:40:52 GMT
833 nghttpx - proxy
836 ``nghttpx`` is a multi-threaded reverse proxy for HTTP/3, HTTP/2, and
840 We reworked ``nghttpx`` command-line interface, and as a result, there
845 <https://nghttp2.org/documentation/nghttpx-howto.html#migration-from-nghttpx-v1-8-0-or-earlier>`_
848 ``nghttpx`` implements `important performance-oriented features
849 <https://istlsfastyet.com/#server-performance>`_ in TLS, such as
861 ``--http2-proxy`` HTTP/3, HTTP/2, HTTP/1.1 HTTP/1.1, HTTP/2 Forward proxy
865 a reverse proxy and listens for HTTP/3, HTTP/2, and HTTP/1.1 and can
866 be deployed as a SSL/TLS terminator for existing web server.
869 default. To disable encryption, use the ``no-tls`` keyword in
870 ``--frontend`` option. If encryption is disabled, incoming HTTP/1.1
873 encrypt backend connections, use ``tls`` keyword in ``--backend``
876 ``nghttpx`` supports a configuration file. See the ``--conf`` option and
882 .. code-block:: text
884 Client <-- (HTTP/3, HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/1.1, HTTP/2) --> Web Server
887 With the ``--http2-proxy`` option, it works as forward proxy, and it
890 .. code-block:: text
892 Client <-- (HTTP/3, HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/1.1) --> Proxy
902 .. code-block:: javascript
910 certificate for secure proxy.
914 .. code-block:: text
916 $ google-chrome --proxy-pac-url=file:///path/to/proxy.pac --use-npn
919 The proxy is specified using ``--backend-http-proxy-uri``. The
923 .. code-block:: text
925 Client <-- (HTTP/3, HTTP/2, HTTP/1.1) --> nghttpx <-- (HTTP/2) --
927 --===================---> HTTP/2 Proxy
928 (HTTP proxy tunnel) (e.g., nghttpx -s)
931 -----------------
933 The ``h2load`` program is a benchmarking tool for HTTP/3, HTTP/2, and
938 .. code-block:: text
940 $ h2load -n100000 -c100 -m100 https://localhost:8443/
944 Cipher: ECDHE-RSA-AES128-GCM-SHA256
945 Server Temp Key: ECDH P-256 256 bits
961 min max mean sd +/- sd
962 time for request: 25.12ms 124.55ms 51.07ms 15.36ms 84.87%
963 time for connect: 208.94ms 254.67ms 241.38ms 7.95ms 63.00%
968 per client. With the ``-t`` option, ``h2load`` will use multiple native
978 HTTP/3 server. To do this, specify ``h3`` to ``--alpn-list`` option
981 .. code-block:: text
983 $ h2load --alpn-list h3 https://127.0.0.1:4433
985 For nghttp2 v1.58 or earlier, use ``--npn-list`` instead of
986 ``--alpn-list``.
989 -----------
992 command-line header compression tool. The ``inflatehd`` program is a
993 command-line header decompression tool. Both tools read input from
996 format described at https://github.com/http2jp/hpack-test-case.
998 deflatehd - header compressor
1001 The ``deflatehd`` program reads JSON data or HTTP/1-style header fields from
1004 For the JSON input, the root JSON object must include a ``cases`` key.
1013 .. code-block:: json
1034 With the ``-t`` option, the program can accept more familiar HTTP/1 style
1039 .. code-block:: text
1046 user-agent: nghttp2
1074 .. code-block:: json
1099 "user-agent": "nghttp2"
1125 "user-agent": "nghttp2"
1134 The output can be used as the input for ``inflatehd`` and
1137 With the ``-d`` option, the extra ``header_table`` key is added and its
1166 that they are no longer referenced.
1170 .. code-block:: json
1195 "user-agent": "nghttp2"
1203 "name": "user-agent",
1264 "user-agent": "nghttp2"
1279 "name": "user-agent",
1322 inflatehd - header decompressor
1336 .. code-block:: json
1364 .. code-block:: json
1386 "user-agent": "nghttp2"
1403 "user-agent": "nghttp2"
1417 The output can be used as the input for ``deflatehd`` and
1420 With the ``-d`` option, the extra ``header_table`` key is added and its
1426 ------------
1443 We will credit you for your
1449 <https://nghttp2.org/documentation/contribute.html>`_ for more
1453 ----------
1457 We may release PATCH releases between the regular releases, mainly for
1460 We have no plan to break API compatibility changes involving soname
1461 bump, so MAJOR version will stay 1 for the foreseeable future.
1464 -------