mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-13 14:31:15 +00:00
user can manage own peers on default device (#82)
Co-authored-by: GitHubActionRunner <knm@knm.io>
This commit is contained in:
@@ -7,6 +7,7 @@ type Config struct {
|
||||
DefaultDeviceName string `yaml:"defaultDevice" envconfig:"WG_DEFAULT_DEVICE"` // this device is used for auto-created peers, use GetDefaultDeviceName() to access this field
|
||||
ConfigDirectoryPath string `yaml:"configDirectory" envconfig:"WG_CONFIG_PATH"` // optional, if set, updates will be written to this path, filename: <devicename>.conf
|
||||
ManageIPAddresses bool `yaml:"manageIPAddresses" envconfig:"MANAGE_IPS"` // handle ip-address setup of interface
|
||||
UserManagePeers bool `yaml:"userManagePeers" envconfig:"USER_MANAGE_PEERS"` // user can manage own peers
|
||||
}
|
||||
|
||||
func (c Config) GetDefaultDeviceName() string {
|
||||
|
@@ -5,7 +5,8 @@
|
||||
[Interface]
|
||||
|
||||
# Core settings
|
||||
PrivateKey = {{ .Peer.PrivateKey }}
|
||||
|
||||
PrivateKey = {{or .Peer.PrivateKey "<please-insert-your-private-key>" }}
|
||||
Address = {{ .Peer.IPsStr }}
|
||||
|
||||
# Misc. settings (optional)
|
||||
|
Reference in New Issue
Block a user