refactor: correction in debugging messages (#238)

* removed typos
* converted some words to lower case
This commit is contained in:
vps 2024-09-08 11:38:59 +03:00 committed by GitHub
parent 2e45975ea9
commit 78b9cdb3c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 8 deletions

View File

@ -85,7 +85,7 @@ func (h *HttpHandler) deliverRequest(ctx context.Context, from *net.TCPConn, to
pkt.Tidy() pkt.Tidy()
if _, err := to.Write(pkt.Raw()); err != nil { if _, err := to.Write(pkt.Raw()); err != nil {
logger.Debug().Msgf("error Writing to %s", td) logger.Debug().Msgf("error writing to %s", td)
return return
} }
} }
@ -116,7 +116,7 @@ func (h *HttpHandler) deliverResponse(ctx context.Context, from *net.TCPConn, to
} }
if _, err := to.Write(bytesRead); err != nil { if _, err := to.Write(bytesRead); err != nil {
logger.Debug().Msgf("error Writing to %s", td) logger.Debug().Msgf("error writing to %s", td)
return return
} }
} }

View File

@ -61,7 +61,7 @@ func (h *HttpsHandler) Serve(ctx context.Context, lConn *net.TCPConn, initPkt *p
return return
} }
logger.Debug().Msgf("sent connection estabalished to %s", lConn.RemoteAddr()) logger.Debug().Msgf("sent connection established to %s", lConn.RemoteAddr())
// Read client hello // Read client hello
m, err := packet.ReadTLSMessage(lConn) m, err := packet.ReadTLSMessage(lConn)
@ -118,7 +118,7 @@ func (h *HttpsHandler) communicate(ctx context.Context, from *net.TCPConn, to *n
} }
if _, err := to.Write(bytesRead); err != nil { if _, err := to.Write(bytesRead); err != nil {
logger.Debug().Msgf("error Writing to %s", td) logger.Debug().Msgf("error writing to %s", td)
return return
} }
} }

View File

@ -2,11 +2,11 @@ package proxy
import ( import (
"context" "context"
"github.com/xvzc/SpoofDPI/util"
"net" "net"
"strconv" "strconv"
"github.com/xvzc/SpoofDPI/packet" "github.com/xvzc/SpoofDPI/packet"
"github.com/xvzc/SpoofDPI/util"
"github.com/xvzc/SpoofDPI/util/log" "github.com/xvzc/SpoofDPI/util/log"
) )
@ -41,7 +41,7 @@ func (pxy *Proxy) handleHttps(ctx context.Context, lConn *net.TCPConn, exploit b
return return
} }
logger.Debug().Msgf("sent connection estabalished to %s", lConn.RemoteAddr()) logger.Debug().Msgf("sent connection established to %s", lConn.RemoteAddr())
// Read client hello // Read client hello
m, err := packet.ReadTLSMessage(lConn) m, err := packet.ReadTLSMessage(lConn)

View File

@ -3,11 +3,11 @@ package proxy
import ( import (
"context" "context"
"errors" "errors"
"github.com/xvzc/SpoofDPI/util"
"io" "io"
"net" "net"
"time" "time"
"github.com/xvzc/SpoofDPI/util"
"github.com/xvzc/SpoofDPI/util/log" "github.com/xvzc/SpoofDPI/util/log"
) )
@ -65,7 +65,7 @@ func Serve(ctx context.Context, from *net.TCPConn, to *net.TCPConn, proto string
} }
if _, err := to.Write(bytesRead); err != nil { if _, err := to.Write(bytesRead); err != nil {
logger.Debug().Msgf("error Writing to %s", td) logger.Debug().Msgf("error writing to %s", td)
return return
} }
} }