summaryrefslogtreecommitdiff
path: root/client/proxy.go
diff options
context:
space:
mode:
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)