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	imply MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM
21
22if NET_SAMPLE_HTTPS_SERVICE
23
24config NET_SAMPLE_HTTPS_SERVER_SERVICE_PORT
25	int "Port number for https service"
26	default 443
27	depends on NET_SAMPLE_HTTPS_SERVICE
28
29config NET_SAMPLE_HTTPS_USE_ALPN
30	bool "Allow HTTP2 connectivity with web browsers by using ALPN"
31	select MBEDTLS_SSL_ALPN
32	select HTTP_SERVER_TLS_USE_ALPN
33	help
34	  Web browsers only use HTTP/2 over HTTPS, and use ALPN to determine if a
35	  server supports HTTP/2. If this option is enabled, web browsers can use
36	  HTTP/2 to communicate with the server. However web browsers are stricter
37	  with security when using HTTP/2, at a minimum you will need to add the CA
38	  certificate used to sign the server certificate into your web browser's
39	  trusted authorities. Otherwise the connection can fail with a security
40	  error, without giving an option to ignore this and proceed anyway.
41
42endif # NET_SAMPLE_HTTPS_SERVICE
43
44config NET_SAMPLE_PSK_HEADER_FILE
45	string "Header file containing PSK"
46	default "dummy_psk.h"
47	depends on MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
48	help
49	  Name of a header file containing a
50	  pre-shared key.
51
52config NET_SAMPLE_WEBSOCKET_SERVICE
53	bool "Enable websocket service"
54	default y if HTTP_SERVER_WEBSOCKET
55
56config NET_SAMPLE_NUM_WEBSOCKET_HANDLERS
57	int "How many websocket connections to serve at the same time"
58	depends on NET_SAMPLE_WEBSOCKET_SERVICE
59	default 1
60	help
61	  Each websocket connection is served by a thread which needs
62	  memory. Only increase the value here if really needed.
63
64config NET_SAMPLE_WEBSOCKET_STATS_INTERVAL
65	int "Interval in milliseconds to send network stats over websocket"
66	depends on NET_SAMPLE_WEBSOCKET_SERVICE
67	default 200
68	help
69	  This interval controls how often the net stats data shown on the web page
70	  will be updated.
71
72source "Kconfig.zephyr"
73