summaryrefslogtreecommitdiff
path: root/client/proxy.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-02-12 19:18:05 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2024-02-19 14:15:07 +0100
commit74e36f0ead717105f26087c2cab08b41ba5a7ce8 (patch)
tree1eb2b7516bea705c9b5a50ce0965e170414ed880 /client/proxy.go
parent682d70091af2044ff6d8b350da9dff13163232e2 (diff)
All: Document everything to pass revive lint
Diffstat (limited to 'client/proxy.go')
-rw-r--r--client/proxy.go4
1 files changed, 4 insertions, 0 deletions
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)