Add application level Kconfig option to enable ALPN usage for negotiating HTTP/2 connection with web browsers. Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
# Config options for http2 server sample application
|
|
|
|
# Copyright (c) 2023, Emna Rekik
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
mainmenu "HTTP2 server sample application"
|
|
|
|
config NET_SAMPLE_HTTP_SERVICE
|
|
bool "Enable http service"
|
|
default y
|
|
|
|
config NET_SAMPLE_HTTP_SERVER_SERVICE_PORT
|
|
int "Port number for http service"
|
|
default 80
|
|
depends on NET_SAMPLE_HTTP_SERVICE
|
|
|
|
config NET_SAMPLE_HTTPS_SERVICE
|
|
bool "Enable https service"
|
|
depends on NET_SOCKETS_SOCKOPT_TLS || TLS_CREDENTIALS
|
|
|
|
if NET_SAMPLE_HTTPS_SERVICE
|
|
|
|
config NET_SAMPLE_HTTPS_SERVER_SERVICE_PORT
|
|
int "Port number for https service"
|
|
default 443
|
|
depends on NET_SAMPLE_HTTPS_SERVICE
|
|
|
|
config NET_SAMPLE_HTTPS_USE_ALPN
|
|
bool "Allow HTTP2 connectivity with web browsers by using ALPN"
|
|
select MBEDTLS_SSL_ALPN
|
|
select HTTP_SERVER_TLS_USE_ALPN
|
|
help
|
|
Web browsers only use HTTP/2 over HTTPS, and use ALPN to determine if a
|
|
server supports HTTP/2. If this option is enabled, web browsers can use
|
|
HTTP/2 to communicate with the server. However web browsers are stricter
|
|
with security when using HTTP/2, at a minimum you will need to add the CA
|
|
certificate used to sign the server certificate into your web browser's
|
|
trusted authorities. Otherwise the connection can fail with a security
|
|
error, without giving an option to ignore this and proceed anyway.
|
|
|
|
endif # NET_SAMPLE_HTTPS_SERVICE
|
|
|
|
config NET_SAMPLE_PSK_HEADER_FILE
|
|
string "Header file containing PSK"
|
|
default "dummy_psk.h"
|
|
depends on MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
|
|
help
|
|
Name of a header file containing a
|
|
pre-shared key.
|
|
|
|
config NET_SAMPLE_WEBSOCKET_SERVICE
|
|
bool "Enable websocket service"
|
|
default y if HTTP_SERVER_WEBSOCKET
|
|
|
|
config NET_SAMPLE_NUM_WEBSOCKET_HANDLERS
|
|
int "How many websocket connections to serve at the same time"
|
|
depends on NET_SAMPLE_WEBSOCKET_SERVICE
|
|
default 1
|
|
help
|
|
Each websocket connection is served by a thread which needs
|
|
memory. Only increase the value here if really needed.
|
|
|
|
config NET_SAMPLE_WEBSOCKET_STATS_INTERVAL
|
|
int "Interval in milliseconds to send network stats over websocket"
|
|
depends on NET_SAMPLE_WEBSOCKET_SERVICE
|
|
default 200
|
|
help
|
|
This interval controls how often the net stats data shown on the web page
|
|
will be updated.
|
|
|
|
source "Kconfig.zephyr"
|