feat(config): read Wireguard config from secret
- defaults to `/run/secrets/wg0.conf` - can be changed with variable `WIREGUARD_CONF_SECRETFILE`
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package secrets
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/configuration/settings"
|
||||
@@ -36,5 +37,10 @@ func (s *Source) Read() (settings settings.Settings, err error) {
|
||||
return settings, err
|
||||
}
|
||||
|
||||
settings.VPN.Wireguard, err = s.readWireguard()
|
||||
if err != nil {
|
||||
return settings, fmt.Errorf("reading Wireguard: %w", err)
|
||||
}
|
||||
|
||||
return settings, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user