From 74e36f0ead717105f26087c2cab08b41ba5a7ce8 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 12 Feb 2024 19:18:05 +0100 Subject: All: Document everything to pass revive lint --- client/proxy.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client/proxy.go') diff --git a/client/proxy.go b/client/proxy.go index 0e78792..4165c0f 100644 --- a/client/proxy.go +++ b/client/proxy.go @@ -7,17 +7,21 @@ import ( "github.com/eduvpn/eduvpn-common/types/cookie" ) +// ProxyLogger is defined here such that we can update the proxyguard logger type ProxyLogger struct{} +// Logf logs a message with parameters func (pl *ProxyLogger) Logf(msg string, params ...interface{}) { log.Logger.Debugf(msg, params...) } +// Log logs a message func (pl *ProxyLogger) Log(msg string) { log.Logger.Debugf("%s", msg) } func (c *Client) StartProxyguard(ck *cookie.Cookie, listen string, tcpsp int, peer string) error { +// StartProxyguard starts proxyguard for proxied WireGuard connections var err error proxyguard.UpdateLogger(&ProxyLogger{}) err = proxyguard.Client(ck.Context(), listen, tcpsp, peer, -1) -- cgit v1.2.3