NHAS / wag

Simple Wireguard 2FA
BSD 3-Clause "New" or "Revised" License
499 stars 27 forks source link

change the register_device .conf download name #63

Closed mestara closed 10 months ago

mestara commented 12 months ago

Feature request:

Ability to change the name of the file that downloads from register_device by default from wg0.conf to (selectname).conf

Would like to have it so that my users can be given a super simple set of instructions and just import the file and it automatically has a standardised interface name within wireguard

Possibly... and I'm no go coder so possibly some syntax errors 😬 ...

In config.go DownloadFilename defined as a string

in web.go line 491 on stable w.Header().Set("Content-Disposition", "attachment; filename=", config.Values().DownloadFilename, ".conf")

Maybe missed something too.

NHAS commented 12 months ago

Cool this now exists on unstable:

DownloadConfigFileName is the option.

mestara commented 12 months ago

ah, + not , to join the filename= and the variable from the config and.. i dont know why i tried to seperate the .conf thats.. it is much more logical that the filename within the config should be defined like that yes!

Works, Thanks