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

Fix client dialer log #1568

merged 3 commits into from
Apr 6, 2022

Conversation

yuhan6665
Copy link
Contributor

Log such as:
tunneling request to tcp:www.google.com:80 via tcp:x.x.x.x:443
the second "tcp" is misleading when using mKcp or quic transport

Remove the second "tcp" and add the correct logging for transport dialer:

  • transport/internet/tcp: dialing TCP to tcp:x.x.x.x:443
  • transport/internet/kcp: dialing mKCP to udp:x.x.x.x:4430
  • transport/internet/quic: dialing quic to udp:x.x.x.x:443

Log such as:
tunneling request to tcp:www.google.com:80 via tcp:x.x.x.x:443
the second "tcp" is misleading when using mKcp or quic transport

Remove the second "tcp" and add the correct logging for transport dialer:
- transport/internet/tcp: dialing TCP to tcp:x.x.x.x:443
- transport/internet/quic: dialing quic to udp:x.x.x.x:443
@codecov-commenter
Copy link
codecov-commenter commented Jan 24, 2022

Codecov Report

Merging #1568 (fdd123d) into master (1df4322) will decrease coverage by 0.08%.
The diff coverage is 40.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1568      +/-   ##
==========================================
- Coverage   39.29%   39.21%   -0.09%     
==========================================
  Files         602      605       +3     
  Lines       35480    35630     +150     
==========================================
+ Hits        13941    13971      +30     
- Misses      20003    20100      +97     
- Partials     1536     1559      +23     
Impacted Files Coverage Δ
proxy/shadowsocks/client.go 0.86% <0.00%> (ø)
proxy/trojan/client.go 1.36% <0.00%> (ø)
proxy/vless/outbound/outbound.go 1.08% <0.00%> (ø)
proxy/vmess/outbound/outbound.go 61.78% <100.00%> (ø)
transport/internet/quic/dialer.go 57.75% <100.00%> (+0.36%) ⬆️
transport/internet/kcp/dialer.go 80.39% <0.00%> (-3.93%) ⬇️
transport/internet/tcp/sockopt_linux.go 38.46% <0.00%> (ø)
transport/internet/udp/hub_linux.go 12.50% <0.00%> (ø)
transport/internet/sockopt_linux.go 10.81% <0.00%> (ø)
transport/internet/kcp/receiving.go 100.00% <0.00%> (+1.34%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1df4322...fdd123d. Read the comment docs.

@kslr kslr requested a review from AkinoKaede February 6, 2022 06:37
yuhan6665 and others added 2 commits February 7, 2022 10:37
Co-authored-by: 秋のかえで <autmaple@protonmail.com>
@kslr kslr merged commit 7bcb3c9 into v2fly:master Apr 6, 2022
@@ -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
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0