mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
feat: use per-tunnel ifname instead of hardcoded WG_INTERFACE in platform helpers
This commit is contained in:
@@ -117,8 +117,8 @@ bool WireguardUtilsWindows::addInterface(const InterfaceConfig& config) {
|
||||
|
||||
// Determine the interface LUID
|
||||
NET_LUID luid;
|
||||
QString ifAlias = interfaceName();
|
||||
DWORD result = ConvertInterfaceAliasToLuid((wchar_t*)ifAlias.utf16(), &luid);
|
||||
const QString ifname = config.m_ifname.isEmpty() ? interfaceName() : config.m_ifname;
|
||||
DWORD result = ConvertInterfaceAliasToLuid((wchar_t*)ifname.utf16(), &luid);
|
||||
if (result != 0) {
|
||||
logger.error() << "Failed to lookup LUID:" << result;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user