Browse Source

Allow telnet access always when using the ESPurna Core image

softuart
Xose Pérez 6 years ago
parent
commit
4266bd07f0
4 changed files with 2589 additions and 2579 deletions
  1. +5
    -3
      code/espurna/config/general.h
  2. BIN
      code/espurna/data/index.html.gz
  3. +2575
    -2575
      code/espurna/static/index.html.gz.h
  4. +9
    -1
      code/espurna/telnet.ino

+ 5
- 3
code/espurna/config/general.h View File

@ -21,14 +21,16 @@
#ifdef ESPURNA_CORE
#define ALEXA_SUPPORT 0
#define SCHEDULER_SUPPORT 0
#define BROKER_SUPPORT 0
#define DOMOTICZ_SUPPORT 0
#define HOMEASSISTANT_SUPPORT 0
#define I2C_SUPPORT 0
#define MQTT_SUPPORT 0
#define NTP_SUPPORT 0
#define WEB_SUPPORT 0
#define SCHEDULER_SUPPORT 0
#define SENSOR_SUPPORT 0
#define I2C_SUPPORT 0
#define THINGSPEAK_SUPPORT 0
#define WEB_SUPPORT 0
#endif
//------------------------------------------------------------------------------


BIN
code/espurna/data/index.html.gz View File


+ 2575
- 2575
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 9
- 1
code/espurna/telnet.ino View File

@ -71,7 +71,14 @@ void _telnetData(unsigned char clientId, void *data, size_t len) {
void _telnetNewClient(AsyncClient *client) {
if (client->localIP() != WiFi.softAPIP()) {
bool telnetSTA = getSetting("telnetSTA", TELNET_STA).toInt() == 1;
// Telnet is always available for the ESPurna Core image
#ifdef ESPURNA_CORE
bool telnetSTA = true;
#else
bool telnetSTA = getSetting("telnetSTA", TELNET_STA).toInt() == 1;
#endif
if (!telnetSTA) {
DEBUG_MSG_P(PSTR("[TELNET] Rejecting - Only local connections\n"));
client->onDisconnect([](void *s, AsyncClient *c) {
@ -81,6 +88,7 @@ void _telnetNewClient(AsyncClient *client) {
client->close(true);
return;
}
}
for (unsigned char i = 0; i < TELNET_MAX_CLIENTS; i++) {


Loading…
Cancel
Save