Fallback to package loss solution if the raw socket does not work.

This commit is contained in:
Zoltán Papp 2025-02-18 13:58:20 +01:00
parent 1eacff250e
commit f0020ad4ce

View File

@ -128,6 +128,8 @@ func (p *WGUDPProxy) RedirectAs(endpoint *net.UDPAddr) {
srcFakerConn, err := NewSrcFaker(p.localWGListenPort, endpoint)
if err != nil {
log.Errorf("failed to create src faker conn: %s", err)
// fallback to continue without redirecting
p.paused = true
return
}
p.srcFakerConn = srcFakerConn