diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-02-12 19:46:20 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-02-19 14:15:07 +0100 |
| commit | a73197c6daed512ab34a15c75eb0a60a9dff9848 (patch) | |
| tree | 358d8f2339c2fc199efcd213c120bf655e4d93bd /client | |
| parent | 9c848e6cbb3ee5881fd4d894608d8556b2201084 (diff) | |
Proxyguard: Support a FD callback
useful for the android app
Diffstat (limited to 'client')
| -rw-r--r-- | client/proxy.go | 3 |
1 files changed, 2 insertions, 1 deletions
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") |
