#pragma once #include #include #include #include #include "httpapi.h" #include "proxyservice.h" class Settings; class ProxyServer : public QObject { Q_OBJECT public: explicit ProxyServer(const std::shared_ptr &settings, QObject *parent = nullptr); ~ProxyServer(); bool start(quint16 port = 8080); void stop(); private: bool startXrayProcess(); void stopXrayProcess(); QScopedPointer m_api; QSharedPointer m_service; bool m_isRunning {false}; quint16 m_currentPort {0}; };