From a73197c6daed512ab34a15c75eb0a60a9dff9848 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 12 Feb 2024 19:46:20 +0100 Subject: Proxyguard: Support a FD callback useful for the android app --- client/proxy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/proxy.go b/client/proxy.go index 4165c0f..349a080 100644 --- a/client/proxy.go +++ b/client/proxy.go @@ -20,10 +20,11 @@ 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 +func (c *Client) StartProxyguard(ck *cookie.Cookie, listen string, tcpsp int, peer string, gotFD func(fd int)) error { var err error proxyguard.UpdateLogger(&ProxyLogger{}) + proxyguard.GotClientFD = gotFD err = proxyguard.Client(ck.Context(), listen, tcpsp, peer, -1) if err != nil { return i18nerr.Wrap(err, "The VPN proxy exited") -- cgit v1.2.3