conf: bring over changes from wireguard-windows#10
https://github.com/WireGuard/wireguard-windows/pull/10 don't appear to be of interest, and now need big rebasing. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
77158f3dde
commit
d5812860fc
6 changed files with 128 additions and 4 deletions
18
conf/path.go
Normal file
18
conf/path.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package conf
|
||||
|
||||
var cachedConfigFileDir string
|
||||
var cachedRootDir string
|
||||
var disableAutoMigration bool
|
||||
|
||||
// PresetRootDirectory causes RootDirectory() to not try any automatic deduction, and instead
|
||||
// uses what's passed to it. This isn't used by wireguard-windows, but is useful for external
|
||||
// consumers of our libraries who might want to do strange things.
|
||||
func PresetRootDirectory(root string) {
|
||||
cachedRootDir = root
|
||||
disableAutoMigration = true
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue