Update AppImage

This commit is contained in:
MacRimi
2025-11-13 19:51:42 +01:00
parent 307ed0c637
commit 3883039764
2 changed files with 25 additions and 22 deletions

View File

@@ -31,9 +31,6 @@ A modern, responsive dashboard for monitoring Proxmox VE systems built with Next
The application runs as a standalone AppImage on your Proxmox server and serves a web interface accessible from any device on your network.
<p align="center">
<img src="public/images/proxmenux-logo.png" alt="ProxMenux Monitor Logo" width="200"/>
</p>
## Screenshots
@@ -136,22 +133,6 @@ location /proxmenux-monitor/ {
}
```
### Manual Installation (Standalone)
If you want to run ProxMenux Monitor as a standalone application outside of ProxMenux:
1. Download the latest `ProxMenux-Monitor.AppImage` from the releases page
2. Make it executable:
```bash
chmod +x ProxMenux-Monitor.AppImage
```
3. Run the AppImage:
```bash
./ProxMenux-Monitor.AppImage
```
4. Access the dashboard at `http://your-proxmox-ip:8008`
The application will start automatically and create a systemd service for persistence.
## Authentication & Security
@@ -685,6 +666,19 @@ entities:
---
## Contributing
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
### Development Setup
1. Clone the repository
2. Install dependencies: `npm install`
3. Run development server: `npm run dev`
4. Build AppImage: `./build_appimage.sh`
---
## License
This project is licensed under the **Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)**.

View File

@@ -231,17 +231,25 @@ def totp_disable():
def generate_api_token():
"""Generate a long-lived API token for external integrations (Homepage, Home Assistant, etc.)"""
try:
token = request.headers.get('Authorization', '').replace('Bearer ', '')
auth_header = request.headers.get('Authorization', '')
token = auth_header.replace('Bearer ', '')
if not token:
return jsonify({"success": False, "message": "Unauthorized. Please log in first."}), 401
username = auth_manager.verify_token(token)
if not username:
return jsonify({"success": False, "message": "Unauthorized. Please log in first."}), 401
return jsonify({"success": False, "message": "Invalid or expired session. Please log in again."}), 401
data = request.json
password = data.get('password')
totp_token = data.get('totp_token') # Optional 2FA token
token_name = data.get('token_name', 'API Token') # Optional token description
if not password:
return jsonify({"success": False, "message": "Password is required"}), 400
# Authenticate user with password and optional 2FA
success, _, requires_totp, message = auth_manager.authenticate(username, password, totp_token)
@@ -266,4 +274,5 @@ def generate_api_token():
else:
return jsonify({"success": False, "message": message}), 401
except Exception as e:
return jsonify({"success": False, "message": str(e)}), 500
print(f"[ERROR] generate_api_token: {str(e)}") # Log error for debugging
return jsonify({"success": False, "message": f"Internal error: {str(e)}"}), 500