mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
26 lines
469 B
C++
26 lines
469 B
C++
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <QObject>
|
||
|
|
#include <QScopedPointer>
|
||
|
|
#include <QSharedPointer>
|
||
|
|
#include "proxyservice.h"
|
||
|
|
#include "httpapi.h"
|
||
|
|
|
||
|
|
class ProxyServer : public QObject
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
|
||
|
|
public:
|
||
|
|
explicit ProxyServer(QObject *parent = nullptr);
|
||
|
|
~ProxyServer();
|
||
|
|
|
||
|
|
bool start(quint16 port = 8080);
|
||
|
|
void stop();
|
||
|
|
|
||
|
|
private:
|
||
|
|
bool startXrayProcess();
|
||
|
|
void stopXrayProcess();
|
||
|
|
|
||
|
|
QScopedPointer<HttpApi> m_api;
|
||
|
|
QSharedPointer<ProxyService> m_service;
|
||
|
|
};
|