0

I downloaded the wireguard-windows repository and I navigated to this path
wireguard-windows/tunnel/winipcfg/types.go

in this types.go file I found this function:

// FriendlyName method returns a user-friendly name for the adapter. For example: "Local Area Connection 1."
// This name appears in contexts such as the ipconfig command line program and the Connection folder.
func (addr *IPAdapterAddresses) FriendlyName() string {
    if addr.friendlyName == nil {
        return ""
    }
    return windows.UTF16PtrToString(addr.friendlyName)
}

When creating a connection in this Wireguard desktop app it's creating a network adapter with the name "Wireguard Tunnel", is there a way to change it?

David Browne - Microsoft
  • 80,331
  • 6
  • 39
  • 67
brendamich
  • 11
  • 1

1 Answers1

0

It's not something related to Go. It's more about Windows: ns-iptypes-ip_adapter_addresses_lh You can change friendly name in Windows registry as far as I know.

Eugene Mikhalev
  • 598
  • 3
  • 13
  • But this application (build in Go and C#) it setting the name to Wireguard Tunnel, so it's coming from somewhere from that app, I'm trying to find where. – brendamich Aug 20 '23 at 18:47
  • As it mentioned in the comment for [IPAdapterAddresses](https://github.com/WireGuard/wireguard-windows/blob/master/tunnel/winipcfg/types_64.go#L32) function : `This is a modified and extended version of windows.IpAdapterAddresses.` – Eugene Mikhalev Aug 20 '23 at 20:15
  • when you said that I can change the friendly name in the Windows registry, did you mean manually and run it? or you know a way to change it in the app so it would show another name as I run the app. – brendamich Aug 20 '23 at 22:18
  • Not sure, but may be this will help: [Changing the Network adapter name Programmatically in windows with Qt](https://stackoverflow.com/a/49968571/6731606) – Eugene Mikhalev Aug 21 '23 at 04:26