mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-07 04:20:12 +02:00
b04529c380
- amneziawg is now a VPN protocol and no longer a Wireguard implementation - Use it with VPN_TYPE=amneziawg - document AMNEZIAWG_* options in Dockerfile - document amneziawg support in readme - separate amneziawg settings and code from wireguard - re-use code from wireguard whenever possible
27 lines
493 B
Go
27 lines
493 B
Go
package wireguard
|
|
|
|
import (
|
|
"golang.zx2c4.com/wireguard/device"
|
|
)
|
|
|
|
//go:generate mockgen -destination=log_mock_test.go -package wireguard . Logger
|
|
|
|
type Logger interface {
|
|
Debug(s string)
|
|
Debugf(format string, args ...interface{})
|
|
Info(s string)
|
|
Error(s string)
|
|
Erroer
|
|
}
|
|
|
|
type Erroer interface {
|
|
Errorf(format string, args ...any)
|
|
}
|
|
|
|
func makeDeviceLogger(logger Logger) (deviceLogger *device.Logger) {
|
|
return &device.Logger{
|
|
Verbosef: logger.Debugf,
|
|
Errorf: logger.Errorf,
|
|
}
|
|
}
|