8000 Fix client dialer log by yuhan6665 · Pull Request #1568 · v2fly/v2ray-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix client dialer log #1568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proxy/shadowsocks/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (c *Client) Process(ctx context.Context, link *transport.Link, dialer inter
if err != nil {
return newError("failed to find an available destination").AtWarning().Base(err)
}
newError("tunneling request to ", destination, " via ", server.Destination()).WriteToLog(session.ExportIDToError(ctx))
newError("tunneling request to ", destination, " via ", network, ":", server.Destination().NetAddr()).WriteToLog(session.ExportIDToError(ctx))
Copy link < 8000 div aria-live="polite" aria-atomic="true" class="sr-only" data-clipboard-copy-feedback>
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be misleading when using mKCP and QUIC.

Copy link
Contributor
@kslr kslr Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we change it to this:

tun...   to...  via ...  drive...
                         or transport...

tun...  to tcp:google.com:443 via tcp:127.0.0.1:1080 transport quic


defer conn.Close()

Expand Down
2 changes: 1 addition & 1 deletion proxy/trojan/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (c *Client) Process(ctx context.Context, link *transport.Link, dialer inter
if err != nil {
return newError("failed to find an available destination").AtWarning().Base(err)
}
newError("tunneling request to ", destination, " via ", server.Destination()).WriteToLog(session.ExportIDToError(ctx))
newError("tunneling request to ", destination, " via ", server.Destination().NetAddr()).WriteToLog(session.ExportIDToError(ctx))

defer conn.Close()

Expand Down
2 changes: 1 addition & 1 deletion proxy/vless/outbound/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
}

target := outbound.Target
newError("tunneling request to ", target, " via ", rec.Destination()).AtInfo().WriteToLog(session.ExportIDToError(ctx))
newError("tunneling request to ", target, " via ", rec.Destination().NetAddr()).AtInfo().WriteToLog(session.ExportIDToError(ctx))

command := protocol.RequestCommandTCP
if target.Network == net.Network_UDP {
Expand Down
2 changes: 1 addition & 1 deletion proxy/vmess/outbound/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
}

target := outbound.Target
newError("tunneling request to ", target, " via ", rec.Destination()).WriteToLog(session.ExportIDToError(ctx))
newError("tunneling request to ", target, " via ", rec.Destination().NetAddr()).WriteToLog(session.ExportIDToError(ctx))

command := protocol.RequestCommandTCP
if target.Network == net.Network_UDP {
Expand Down
2 changes: 2 additions & 0 deletions transport/internet/quic/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ func (s *clientConnections) openConnection(destAddr net.Addr, config *Config, tl
}

conns = removeInactiveConnections(conns)

newError("dialing QUIC to ", dest).WriteToLog()

rawConn, err := internet.ListenSystemPacket(context.Background(), &net.UDPAddr{
IP: []byte{0, 0, 0, 0},
Expand Down
0