mirror of
https://github.com/WGDashboard/WGDashboard.git
synced 2026-08-03 22:42:59 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 58fa826862 | |||
| fedf7db8a4 | |||
| cdd85b659c | |||
| 42f9460369 | |||
| ba11a7a355 | |||
| 71f4449741 | |||
| 081c63cd43 |
+1
-1
@@ -105,7 +105,7 @@ Updating the WGDashboard container should be through 'The Docker Way' - by pulli
|
|||||||
| `username` | Any non‐empty string | `-` | `admin` | Username for the WGDashboard web interface account. |
|
| `username` | Any non‐empty string | `-` | `admin` | Username for the WGDashboard web interface account. |
|
||||||
| `password` | Any non‐empty string | `-` | `s3cr3tP@ss` | Password for the WGDashboard web interface account (stored hashed). |
|
| `password` | Any non‐empty string | `-` | `s3cr3tP@ss` | Password for the WGDashboard web interface account (stored hashed). |
|
||||||
| `enable_totp` | `true`, `false` | `true` | `false` | Enable TOTP‐based two‐factor authentication for the account. |
|
| `enable_totp` | `true`, `false` | `true` | `false` | Enable TOTP‐based two‐factor authentication for the account. |
|
||||||
| `wg_autostart` | Wireguard interface name | `false` | `true` | Auto‐start the WireGuard client when the container launches. |
|
| `wg_autostart` | Wireguard interface name | `- ` | `wg0` | Automatically start the specified WireGuard interface when the container starts |
|
||||||
| `email_server` | SMTP server address | `-` | `smtp.gmail.com` | SMTP server for sending email notifications. |
|
| `email_server` | SMTP server address | `-` | `smtp.gmail.com` | SMTP server for sending email notifications. |
|
||||||
| `email_port` | SMTP port number | `-` | `587` | Port for connecting to the SMTP server. |
|
| `email_port` | SMTP port number | `-` | `587` | Port for connecting to the SMTP server. |
|
||||||
| `email_encryption` | `TLS`, `SSL`, etc. | `-` | `TLS` | Encryption method for email communication. |
|
| `email_encryption` | `TLS`, `SSL`, etc. | `-` | `TLS` | Encryption method for email communication. |
|
||||||
|
|||||||
@@ -116,5 +116,5 @@ class AmneziaPeer(Peer):
|
|||||||
self.configuration.getPeers()
|
self.configuration.getPeers()
|
||||||
return True, None
|
return True, None
|
||||||
except subprocess.CalledProcessError as exc:
|
except subprocess.CalledProcessError as exc:
|
||||||
current_app.logger.error(f"Subprocess call failed:\n{exc.output.decode("UTF-8")}")
|
current_app.logger.error(f"Subprocess call failed:\n{exc.output.decode('UTF-8')}")
|
||||||
return False, "Internal server error"
|
return False, "Internal server error"
|
||||||
|
|||||||
@@ -146,7 +146,10 @@ class DashboardConfig:
|
|||||||
if col_name not in existing_columns:
|
if col_name not in existing_columns:
|
||||||
type_str = col_type().compile(dialect=self.engine.dialect)
|
type_str = col_type().compile(dialect=self.engine.dialect)
|
||||||
current_app.logger.info(f"Adding missing column '{col_name}' to table '{table_name}'")
|
current_app.logger.info(f"Adding missing column '{col_name}' to table '{table_name}'")
|
||||||
conn.execute(db.text(f'ALTER TABLE "{table_name}" ADD COLUMN "{col_name}" {type_str}'))
|
preparer = self.engine.dialect.identifier_preparer
|
||||||
|
quoted_table = preparer.quote_identifier(table_name)
|
||||||
|
quoted_column = preparer.quote_identifier(col_name)
|
||||||
|
conn.execute(db.text(f"ALTER TABLE {quoted_table} ADD COLUMN {quoted_column} {type_str}"))
|
||||||
|
|
||||||
def getConnectionString(self, database) -> str or None:
|
def getConnectionString(self, database) -> str or None:
|
||||||
sqlitePath = os.path.join(DashboardConfig.ConfigurationPath, "db")
|
sqlitePath = os.path.join(DashboardConfig.ConfigurationPath, "db")
|
||||||
|
|||||||
+1
-1
@@ -151,7 +151,7 @@ class Peer:
|
|||||||
)
|
)
|
||||||
return True, None
|
return True, None
|
||||||
except subprocess.CalledProcessError as exc:
|
except subprocess.CalledProcessError as exc:
|
||||||
current_app.logger.error(f"Subprocess call failed:\n{exc.output.decode("UTF-8")}")
|
current_app.logger.error(f"Subprocess call failed:\n{exc.output.decode('UTF-8')}")
|
||||||
return False, "Internal server error"
|
return False, "Internal server error"
|
||||||
|
|
||||||
def downloadPeer(self) -> dict[str, str]:
|
def downloadPeer(self) -> dict[str, str]:
|
||||||
|
|||||||
+2
-10
@@ -247,27 +247,19 @@ _checkWireguard(){
|
|||||||
|
|
||||||
|
|
||||||
_checkPythonVersion(){
|
_checkPythonVersion(){
|
||||||
version_pass=$($pythonExecutable -c 'import sys; print("1") if (sys.version_info.major == 3 and sys.version_info.minor >= 10) else print("0");')
|
version_pass=$($pythonExecutable -c 'import sys; print("1") if (sys.version_info.major == 3 and sys.version_info.minor >= 12) else print("0");')
|
||||||
version=$($pythonExecutable --version)
|
version=$($pythonExecutable --version)
|
||||||
if [ $version_pass == "1" ]
|
if [ $version_pass == "1" ]
|
||||||
then
|
then
|
||||||
printf "[WGDashboard] %s Found compatible version of Python. Will be using %s to install WGDashboard.\n" "$heavy_checkmark" "$($pythonExecutable --version)"
|
printf "[WGDashboard] %s Found compatible version of Python. Will be using %s to install WGDashboard.\n" "$heavy_checkmark" "$($pythonExecutable --version)"
|
||||||
return;
|
return;
|
||||||
elif python3.10 --version > /dev/null 2>&1
|
|
||||||
then
|
|
||||||
printf "[WGDashboard] %s Found Python 3.10. Will be using [python3.10] to install WGDashboard.\n" "$heavy_checkmark"
|
|
||||||
pythonExecutable="python3.10"
|
|
||||||
elif python3.11 --version > /dev/null 2>&1
|
|
||||||
then
|
|
||||||
printf "[WGDashboard] %s Found Python 3.11. Will be using [python3.11] to install WGDashboard.\n" "$heavy_checkmark"
|
|
||||||
pythonExecutable="python3.11"
|
|
||||||
elif python3.12 --version > /dev/null 2>&1
|
elif python3.12 --version > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
printf "[WGDashboard] %s Found Python 3.12. Will be using [python3.12] to install WGDashboard.\n" "$heavy_checkmark"
|
printf "[WGDashboard] %s Found Python 3.12. Will be using [python3.12] to install WGDashboard.\n" "$heavy_checkmark"
|
||||||
pythonExecutable="python3.12"
|
pythonExecutable="python3.12"
|
||||||
else
|
else
|
||||||
printf "[WGDashboard] %s Could not find a compatible version of Python. Current Python is %s.\n" "$heavy_crossmark" "$version"
|
printf "[WGDashboard] %s Could not find a compatible version of Python. Current Python is %s.\n" "$heavy_crossmark" "$version"
|
||||||
printf "[WGDashboard] WGDashboard required Python 3.10, 3.11 or 3.12. Halting install now.\n"
|
printf "[WGDashboard] WGDashboard required Python 3.12 or above. Halting install now.\n"
|
||||||
kill $TOP_PID
|
kill $TOP_PID
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user