Jump to content
Not connected, Your IP: 216.73.216.2
Stalinium

Config names are too long for Wireguard

Recommended Posts

Hi I hope you're having a lovely day.

The network interface names in the Linux kernel are limited to 16 characters including the null terminator. This means your name can actually only have 15 chars. The longest valid name is "0123456789abcde.conf" where ".conf" doesn't count.

Wireguard tools behave dumb with regards to this and take the entire file name as the interface name. Predictably it fails when the file name is too long.

wg-quick shows the following error with long names: "wg-quick: `verylongconfignamehere1234567890' does not exist" or "wg-quick: The config file must be a valid interface name, followed by .conf"
Wireguards Android app when you try to import a long config: "Unable to import tunnel: invalid name"

The problem is that the Config Generator creates very long names. Here's one: "AirVPN_CA-Toronto-Ontario_Gorgonea_UDP-1637-Entry3.conf". There doesn't exist an option to make it generate shorter names. Not only is it up to the user to figure out, why the original config is invalid, but renaming them is a chore too.

The shortest legible name format I can come up with is something like "GB-Westerl1637.conf". One more char left or two, if you consider the dash. If you wanted to fit more crucial information namely IPv4 or IPv6 entry and entry IP, it's not gonna look pretty: "GB43Westerl1637.conf" and if the port needed 5 digits, the name would've been cut off more.

This is something that has been bothering me for a while with AirVPN and Wireguard. Thanks for reading.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...