#include "theSecrets.h" #include "theCerts.h" #ifdef ESP32 #include "WiFi.h" #elif defined(ESP8266) #include "ESP8266WiFi.h" #endif #include "Firewall.hpp" fw::Firewall *firewall; void setup_wifi() { Serial.begin(115200); WiFi.mode(WIFI_STA); WiFi.begin(ssid, psk); Serial.printf("Attempting to connect to WPA SSID: %s\n", ssid); while (WiFi.status() != WL_CONNECTED) { Serial.print('.'); delay(1000); } Serial.println(); Serial.print("IP Address: "); Serial.println(WiFi.localIP()); } void setup() { setup_wifi(); firewall = new fw::Firewall(cert, key, username, password, 8080); } void loop() { firewall->handle_api_client(); }