src is includedir
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.6)
|
||||
project(openrouter)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
include_directories(./src/libs/)
|
||||
include_directories(./src/libs/ ./src)
|
||||
|
||||
add_executable(
|
||||
openrouter
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "OpenRouter.hpp"
|
||||
#include <OpenRouter/OpenRouter.hpp>
|
||||
#include <colors.h>
|
||||
#include "../settings/settings.hpp"
|
||||
#include "../system/system.hpp"
|
||||
#include <settings/settings.hpp>
|
||||
#include <system/system.hpp>
|
||||
#include <syslog.h>
|
||||
#include "../security/cors.hpp"
|
||||
#include <security/cors.hpp>
|
||||
|
||||
OpenRouter::OpenRouter()
|
||||
{
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
#include "auth.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <sstream>
|
||||
#include <httplib.h>
|
||||
#include "../routes.hpp"
|
||||
#include <routes.hpp>
|
||||
#include <json.hpp>
|
||||
#include "../types.hpp"
|
||||
#include <types.hpp>
|
||||
|
||||
bool authenticate(const std::string &token)
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "OpenRouter/OpenRouter.hpp"
|
||||
#include <OpenRouter/OpenRouter.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "cors.hpp"
|
||||
#include <security/cors.hpp>
|
||||
#include <colors.h>
|
||||
|
||||
namespace api
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "dns.hpp"
|
||||
#include <settings/dns/dns.hpp>
|
||||
#include <colors.h>
|
||||
#include <json.hpp>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define DNS_REQUIRED_STRING R"({"required":"[token,enabled]"})"
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "dns.hpp"
|
||||
#include <settings/dns/dns.hpp>
|
||||
#include <colors.h>
|
||||
#include <json.hpp>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
namespace api
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "dns.hpp"
|
||||
#include <settings/dns/dns.hpp>
|
||||
#include <colors.h>
|
||||
#include <json.hpp>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
namespace api
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "ftp.hpp"
|
||||
#include <settings/ftp/ftp.hpp>
|
||||
#include <colors.h>
|
||||
#include <json.hpp>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define FTP_REQUIRED_STRING R"({"required":"[token,enabled]"})"
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#ifndef SETTINGS_HPP
|
||||
#define SETTINGS_HPP
|
||||
|
||||
#include "wifi/wifi.hpp"
|
||||
#include "telnet/telnet.hpp"
|
||||
#include "ssh/ssh.hpp"
|
||||
#include "ftp/ftp.hpp"
|
||||
#include "dns/dns.hpp"
|
||||
#include <settings/wifi/wifi.hpp>
|
||||
#include <settings/telnet/telnet.hpp>
|
||||
#include <settings/ssh/ssh.hpp>
|
||||
#include <settings/ftp/ftp.hpp>
|
||||
#include <settings/dns/dns.hpp>
|
||||
|
||||
#endif // SETTINGS_HPP
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "ssh.hpp"
|
||||
#include <settings/ssh/ssh.hpp>
|
||||
#include <colors.h>
|
||||
#include <json.hpp>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define KEYS_PATH "/root/.ssh/authorized_keys"
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include "ssh.hpp"
|
||||
#include <settings/ssh/ssh.hpp>
|
||||
#include <colors.h>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <json.hpp>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define SSH_PORT_REQUIRED_STRING R"({"required":"[token,port]"})"
|
||||
#define SSH_PORT_PATH "/etc/openrouter/ssh/port"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "ssh.hpp"
|
||||
#include <settings/ssh/ssh.hpp>
|
||||
#include <colors.h>
|
||||
#include <json.hpp>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define SSH_REQUIRED_STRING R"({"required":"[token,status]"})"
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include "telnet.hpp"
|
||||
#include <settings/telnet/telnet.hpp>
|
||||
#include <colors.h>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <json.hpp>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define TELNET_REQUIRED_STRING R"({"required":"[token,enabled]"})"
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include "telnet.hpp"
|
||||
#include <settings/telnet/telnet.hpp>
|
||||
#include <colors.h>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <json.hpp>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define TELNET_PORT_REQUIRED_STRING R"({"required":"[token,port]"})"
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include "wifi.hpp"
|
||||
#include <settings/wifi/wifi.hpp>
|
||||
#include <colors.h>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <json.hpp>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define WIFI_CHANNEL_REQUIRED_STRING R"({"required":"[token,channel]"})"
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include "wifi.hpp"
|
||||
#include <settings/wifi/wifi.hpp>
|
||||
#include <colors.h>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <json.hpp>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define WIFI_NAME_REQUIRED_STRING R"({"required":"[token,name]"})"
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include "wifi.hpp"
|
||||
#include <settings/wifi/wifi.hpp>
|
||||
#include <colors.h>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <json.hpp>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define WIFI_PASSWORD_REQUIRED_STRING R"({"required":"[token,password,newpassword]"})"
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "wifi.hpp"
|
||||
#include <settings/wifi/wifi.hpp>
|
||||
#include <colors.h>
|
||||
#include <json.hpp>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <QR-Code-generator/qrcodegen.hpp>
|
||||
#include <QR-Code-generator/qrtosvg.hpp>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
namespace api
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "wifi.hpp"
|
||||
#include <settings/wifi/wifi.hpp>
|
||||
#include <colors.h>
|
||||
#include <json.hpp>
|
||||
#include "../../types.hpp"
|
||||
#include <types.hpp>
|
||||
#include <syslog.h>
|
||||
#include "../../auth/auth.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include <auth/auth.hpp>
|
||||
#include <helpers.hpp>
|
||||
|
||||
#define WIFI_REQUIRED_STRING R"({"required":"[token,status]"})"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "reboot.hpp"
|
||||
#include <system/reboot/reboot.hpp>
|
||||
#include <json.hpp>
|
||||
#include <colors.h>
|
||||
#include "../types.hpp"
|
||||
#include "../../auth/auth.hpp"
|
||||
#include <types.hpp>
|
||||
#include <auth/auth.hpp>
|
||||
|
||||
namespace api
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "syslog.hpp"
|
||||
#include "../types.hpp"
|
||||
#include <system/syslog/syslog.hpp>
|
||||
#include <types.hpp>
|
||||
#include <json.hpp>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#define SYSTEM_HPP
|
||||
|
||||
#ifdef __linux__
|
||||
#include "uptime/uptime.hpp"
|
||||
#include <system/uptime/uptime.hpp>
|
||||
#endif // __linux__
|
||||
#include "syslog/syslog.hpp"
|
||||
#include "reboot/reboot.hpp"
|
||||
#include <system/syslog/syslog.hpp>
|
||||
#include <system/reboot/reboot.hpp>
|
||||
|
||||
#endif // SYSTEM_HPP
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "uptime.hpp"
|
||||
#include <system/uptime/uptime.hpp>
|
||||
#ifdef __linux__
|
||||
#include <sys/sysinfo.h>
|
||||
#endif // __linux__
|
||||
#include <sstream>
|
||||
#include "../types.hpp"
|
||||
#include <types.hpp>
|
||||
|
||||
namespace api
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user