[feature] Customize config filename
nathanael-h opened this issue · 4 comments
This is a feature request.
I'd like to be able to customize the config filename. Because this filename is used as connection name in clients (or at least on different Linux using network manager).
I saw it is harcoded here
Maybe I could try a PR, with some tips.
Just so I understand the details, does renaming the file after downloading not work, or would it just be for convenience to avoid this step?
Do you have in mind editing the filename in the web UI right before downloading (so users can choose it themselves), or setting it globally in the server config.yaml for everyone?
Yes, I can rename the file after downloading, but for convenience I would like to avoid this.
I was thinking of defining the name in an optional setting, that would be applied server-wide.
I see. If you want to have a go at implementing this yourself:
It needs a new config option here:
https://github.com/freifunkMUC/wg-access-server/blob/master/internal/config/config.go
Maybe also a commandline flag here:
wg-access-server/cmd/serve/main.go
Lines 38 to 63 in b71ad3f
To communicate it to the frontend it should probably sent as part of the InfoRes
response to the Info
gRPC call, which contains some global, device independent data that the frontend needs:
https://github.com/freifunkMUC/wg-access-server/blob/master/proto/server.proto
...which the backend populates here:
wg-access-server/internal/services/server_service.go
Lines 59 to 70 in b71ad3f
then you should be able to read it from AppState.Info
in the fronted.
Hello @DasSkelett would it be possible to build and release a new image with this feature?