1# Config options for http2 server sample application 2 3# Copyright (c) 2023, Emna Rekik 4# SPDX-License-Identifier: Apache-2.0 5 6mainmenu "HTTP2 server sample application" 7 8config NET_SAMPLE_HTTP_SERVICE 9 bool "Enable http service" 10 default y 11 12config NET_SAMPLE_HTTP_SERVER_SERVICE_PORT 13 int "Port number for http service" 14 default 80 15 depends on NET_SAMPLE_HTTP_SERVICE 16 17config NET_SAMPLE_HTTPS_SERVICE 18 bool "Enable https service" 19 depends on NET_SOCKETS_SOCKOPT_TLS || TLS_CREDENTIALS 20 21if NET_SAMPLE_HTTPS_SERVICE 22 23config NET_SAMPLE_HTTPS_SERVER_SERVICE_PORT 24 int "Port number for https service" 25 default 443 26 depends on NET_SAMPLE_HTTPS_SERVICE 27 28config NET_SAMPLE_HTTPS_USE_ALPN 29 bool "Allow HTTP2 connectivity with web browsers by using ALPN" 30 select MBEDTLS_SSL_ALPN 31 select HTTP_SERVER_TLS_USE_ALPN 32 help 33 Web browsers only use HTTP/2 over HTTPS, and use ALPN to determine if a 34 server supports HTTP/2. If this option is enabled, web browsers can use 35 HTTP/2 to communicate with the server. However web browsers are stricter 36 with security when using HTTP/2, at a minimum you will need to add the CA 37 certificate used to sign the server certificate into your web browser's 38 trusted authorities. Otherwise the connection can fail with a security 39 error, without giving an option to ignore this and proceed anyway. 40 41endif # NET_SAMPLE_HTTPS_SERVICE 42 43config NET_SAMPLE_PSK_HEADER_FILE 44 string "Header file containing PSK" 45 default "dummy_psk.h" 46 depends on MBEDTLS_KEY_EXCHANGE_PSK_ENABLED 47 help 48 Name of a header file containing a 49 pre-shared key. 50 51config NET_SAMPLE_WEBSOCKET_SERVICE 52 bool "Enable websocket service" 53 default y if HTTP_SERVER_WEBSOCKET 54 55config NET_SAMPLE_NUM_WEBSOCKET_HANDLERS 56 int "How many websocket connections to serve at the same time" 57 depends on NET_SAMPLE_WEBSOCKET_SERVICE 58 default 1 59 help 60 Each websocket connection is served by a thread which needs 61 memory. Only increase the value here if really needed. 62 63config NET_SAMPLE_WEBSOCKET_STATS_INTERVAL 64 int "Interval in milliseconds to send network stats over websocket" 65 depends on NET_SAMPLE_WEBSOCKET_SERVICE 66 default 200 67 help 68 This interval controls how often the net stats data shown on the web page 69 will be updated. 70 71source "Kconfig.zephyr" 72