| 1 | // Copyright (C) Microsoft Corporation. All rights reserved. |
| 2 | |
| 3 | #pragma once |
| 4 | |
| 5 | #include "DnsTunnelingChannel.h" |
| 6 | #include "DnsServer.h" |
| 7 | |
| 8 | class DnsTunnelingManager |
| 9 | { |
| 10 | public: |
| 11 | DnsTunnelingManager(int hvsocketFd, const std::string& dnsTunnelingIpAddress); |
| 12 | ~DnsTunnelingManager(); |
| 13 | |
| 14 | DnsTunnelingManager(const DnsTunnelingManager&) = delete; |
| 15 | DnsTunnelingManager(DnsTunnelingManager&&) = delete; |
| 16 | DnsTunnelingManager& operator=(const DnsTunnelingManager&) = delete; |
| 17 | DnsTunnelingManager& operator=(DnsTunnelingManager&&) = delete; |
| 18 | |
| 19 | private: |
| 20 | // Hvsocket channel used to communicate with the host. |
| 21 | DnsTunnelingChannel m_dnsChannel; |
| 22 | |
| 23 | // DNS server used for tunneling, supporting both UDP and TCP. |
| 24 | DnsServer m_dnsServer; |
| 25 | |
| 26 | std::atomic<bool> m_stopped = false; |
| 27 | }; |