2018-08-08 06:12:38 -05:00
|
|
|
// SPDX-License-Identifier: AGPL-1.0-only
|
|
|
|
// Copyright (C) 2018 Ludvig Strigeus <info@tunsafe.com>. All Rights Reserved.
|
|
|
|
#ifndef TINYVPN_TINYVPN_H_
|
|
|
|
#define TINYVPN_TINYVPN_H_
|
|
|
|
|
2018-10-21 09:00:15 -05:00
|
|
|
#include <string>
|
2018-08-11 20:27:14 -05:00
|
|
|
|
2018-10-21 09:00:15 -05:00
|
|
|
class DnsResolver;
|
2018-08-08 06:12:38 -05:00
|
|
|
class WireguardProcessor;
|
2018-08-11 20:27:14 -05:00
|
|
|
|
2018-09-15 11:22:05 -05:00
|
|
|
class WgConfig {
|
|
|
|
public:
|
|
|
|
static bool HandleConfigurationProtocolMessage(WireguardProcessor *proc, const std::string &&message, std::string *result);
|
|
|
|
private:
|
|
|
|
static void HandleConfigurationProtocolGet(WireguardProcessor *proc, std::string *result);
|
|
|
|
};
|
|
|
|
|
2018-11-27 16:40:53 -06:00
|
|
|
bool ParseWireGuardConfigString(WireguardProcessor *wg, const char *buf, size_t buf_size, DnsResolver *dns_resolver);
|
2018-08-11 20:27:14 -05:00
|
|
|
bool ParseWireGuardConfigFile(WireguardProcessor *wg, const char *filename, DnsResolver *dns_resolver);
|
2018-08-08 06:12:38 -05:00
|
|
|
|
|
|
|
|
|
|
|
#endif // TINYVPN_TINYVPN_H_
|