Compare commits

...

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
8a59648310 Remove colon from 'from:' in log messages
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
2026-01-12 00:06:08 +00:00
copilot-swe-agent[bot]
b6f741306e Fix TCP CanSpliceCopy=3, add destination to LogInfo, remove completed log
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
2026-01-11 23:55:32 +00:00
2 changed files with 3 additions and 5 deletions

View File

@@ -108,7 +108,7 @@ func (t *Handler) HandleConnection(conn net.Conn, destination net.Destination) {
inbound := session.Inbound{
Name: "tun",
Tag: t.tag,
CanSpliceCopy: 1,
CanSpliceCopy: 3,
Source: net.DestinationFromAddr(conn.RemoteAddr()),
User: &protocol.MemoryUser{
Level: t.config.UserLevel,
@@ -127,7 +127,7 @@ func (t *Handler) HandleConnection(conn net.Conn, destination net.Destination) {
Status: log.AccessAccepted,
Reason: "",
})
errors.LogInfo(ctx, "processing connection from: ", conn.RemoteAddr())
errors.LogInfo(ctx, "processing connection from ", conn.RemoteAddr(), " to ", destination)
link := &transport.Link{
Reader: &buf.TimeoutWrapperReader{Reader: buf.NewReader(conn)},
@@ -135,10 +135,7 @@ func (t *Handler) HandleConnection(conn net.Conn, destination net.Destination) {
}
if err := t.dispatcher.DispatchLink(ctx, destination, link); err != nil {
errors.LogError(ctx, errors.New("connection closed").Base(err))
return
}
errors.LogInfo(ctx, "connection completed")
}
// Network implements proxy.Inbound

View File

@@ -117,6 +117,7 @@ func (u *udpConnectionHandler) HandlePacket(src net.Destination, dst net.Destina
Status: log.AccessAccepted,
Reason: "",
})
errors.LogInfo(ctx, "processing connection from ", src, " to ", dst)
link := &transport.Link{
Reader: &buf.TimeoutWrapperReader{Reader: conn.reader},
// reverse source and destination, indicating the packets to write are going in the other