| 105 | |
| 106 | |
| 107 | bool WireGuardController::configureAdapter(const std::string &ipAddress, const std::string &dnsAddressList, const std::string &dnsScriptName, |
| 108 | const std::vector<std::string> &allowedIps, uint32_t fwmark) |
| 109 | { |
| 110 | UNUSED(dnsScriptName); |
| 111 | UNUSED(dnsAddressList); |
| 112 | |
| 113 | spdlog::debug("DNS: \"{}\"", dnsAddressList); |
| 114 | |
| 115 | if (!is_initialized_ || !adapter_.get()) |
| 116 | return false; |
| 117 | return adapter_->setIpAddress(ipAddress) |
| 118 | && adapter_->setDnsServers(dnsAddressList, dnsScriptName) |
| 119 | && adapter_->enableRouting(allowedIps, fwmark); |
| 120 | } |
| 121 | |
| 122 | std::string WireGuardController::getAdapterName() const |
| 123 | { |
no test coverage detected