mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
84d908d4d8
- Added signal for local proxy start failure to Settings. - Updated CoreController to emit failure signals with descriptive messages when local proxy fails to start. - Refactored XrayController to accept JSON configuration directly, improving configuration handling. - Removed unused config file loading logic to streamline the XrayController's functionality.
22 lines
418 B
C++
22 lines
418 B
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
class XrayController : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit XrayController(QObject* parent = nullptr);
|
|
~XrayController();
|
|
|
|
bool start(const QString& configJson);
|
|
bool stop();
|
|
bool isXrayRunning() const;
|
|
qint64 getProcessId() const;
|
|
QString getError() const;
|
|
|
|
private:
|
|
bool m_isRunning {false};
|
|
QString m_lastError;
|
|
};
|