Added an http port definition

pull/8/head
Hieromon Ikasamo 7 years ago
parent 26a1207e64
commit 0fad2b23ad
  1. 1
      mkdocs/api.md
  2. 2
      src/AutoConnect.cpp
  3. 6
      src/AutoConnect.h

@ -15,6 +15,7 @@
#define AUTOCONNECT_AP_GW 0x01F4A8C0 // Default SoftAP Gateway IP #define AUTOCONNECT_AP_GW 0x01F4A8C0 // Default SoftAP Gateway IP
#define AUTOCONNECT_AP_NM 0x00FFFFFF // Default subnet mask #define AUTOCONNECT_AP_NM 0x00FFFFFF // Default subnet mask
#define AUTOCONNECT_DNSPORT 53 // Default DNS port at captive portal #define AUTOCONNECT_DNSPORT 53 // Default DNS port at captive portal
#define AUTOCONNECT_HTTPPORT 80 // Default HTTP
#define AUTOCONNECT_MENU_TITLE "AutoConnect" // Default AutoConnect menu title #define AUTOCONNECT_MENU_TITLE "AutoConnect" // Default AutoConnect menu title
#define AUTOCONNECT_STARTUPTIME 10 // Default waiting time[s] for after reset #define AUTOCONNECT_STARTUPTIME 10 // Default waiting time[s] for after reset
#define AUTOCONNECT_URI "/_ac" // Default AutoConnect root path #define AUTOCONNECT_URI "/_ac" // Default AutoConnect root path

@ -231,7 +231,7 @@ void AutoConnect::_startWebServer() {
// Boot Web server // Boot Web server
if (!_webServer) { if (!_webServer) {
// Only when hosting WebServer internally // Only when hosting WebServer internally
_webServer.reset(new ESP8266WebServer(80)); _webServer.reset(new ESP8266WebServer(AUTOCONNECT_HTTPPORT));
_webServerAlloc = AC_WEBSERVER_HOSTED; _webServerAlloc = AC_WEBSERVER_HOSTED;
AC_DBG("ESP8266WebServer allocated\n"); AC_DBG("ESP8266WebServer allocated\n");
} }

@ -84,8 +84,12 @@ extern "C" {
#define AUTOCONNECT_STARTUPTIME 10 #define AUTOCONNECT_STARTUPTIME 10
#endif #endif
#ifndef AUTOCONNECT_HTTPPORT
#define AUTOCONNECT_HTTPPORT 80
#endif
#ifndef AUTOCONNECT_DNSPORT #ifndef AUTOCONNECT_DNSPORT
#define AUTOCONNECT_DNSPORT 53 #define AUTOCONNECT_DNSPORT 53
#endif #endif
/**< A type to save established credential at WiFi.begin automatically. */ /**< A type to save established credential at WiFi.begin automatically. */

Loading…
Cancel
Save