8000 GitHub - lwv2022/esp32_https_server: Alternative ESP32 Webserver implementation for the ESP32 Arduino Core, supporting HTTPS and HTTP.
[go: up one dir, main page]

Skip to content

Alternative ESP32 Webserver implementation for the ESP32 Arduino Core, supporting HTTPS and HTTP.

License

Notifications You must be signed in to change notification settings

lwv2022/esp32_https_server

 
 

Repository files navigation

ESP32 HTTPS Server

GitHub tag (latest SemVer) Build Examples

This repository contains an HTTPS server library that can be used with the ESP32 Arduino Core. It supports HTTP as well.

Features

  • Providing support for HTTP, HTTPS or both at the same time
  • Handling requests in callback functions that can be bound to URLs, like for example in Express or Servlets.
  • Abstraction of handling the HTTP stuff and providing a simple API for it, eg. to access parameters, headers, HTTP Basic Auth etc.
  • Using middleware functions as proxy to every request to perform central tasks like authentication or logging.
  • Make use of the built-in encryption of the ESP32 module for HTTPS.
  • Handle multiple clients in parallel (max. 3-4 TLS clients due to memory limits).
  • Usage of Connection: keep-alive and SSL session reuse to reduce the overhead of SSL handshakes and speed up data transfer.

Dependencies

The library is self-contained and just needs the Arduino and ESP32 system libraries. Running the examples requires the WiFi library in addition to that.

Setup Instructions

The steps to install this library depend on the IDE you are using. PlatformIO is recommended as you have more options to configure the library (see Advanced Configuration), but the library can be used with the plain Arduino IDE.

PlatformIO (Recommended)

The library is listed in PlatformIO's library registry. If you're using the IDE, search for esp32_https_server and install it, on the command line, just run:

pio lib install "esp32_https_server"

New release can take one or two days before they get picked up by the library crawler which makes them available in the registry. The version numbers of releases are based on semantic versioning.

Add the library to your platform.ini like in the following example:

[platformio]
env_default = wrover

[env:wrover]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = esp32_https_server

If you want a specific version, you can use a notation like lib_deps = esp32_https_server@0.3.0. More information on this can be found in the PlatformIO documentation.

To use the current master of the library, don't add it to your platform.ini but go to your project's libs folder and run the following command to get a copy of repository:

git clone https://github.com/fhessel/esp32_https_server.git

Note: While the master branch should contain a running version of the library at any time, the API might already have changes towards the next major release. So for a stable setup, it is recommended to use a published release.

Arduino IDE