Skip to content
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

show vmess decode errors at warning level #1863

Merged
merged 1 commit into from
Sep 7, 2019
Merged

Conversation

vcptr
Copy link
Contributor

@vcptr vcptr commented Aug 27, 2019

Currently core shows transport error at [Info] level:

2019/08/27 08:51:57 [Info] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:v1.mux.cool:9527 via tcp:nov.meponse header > x509: certificate signed by unknown authority   
2019/08/27 08:54:44 [Info] [154526732] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: failed to read response header > x509: certificate signed by unknown authority

Level Info/Debug are too verbose for users to find the root cause of a failing configuration. Show at warning level is more reasonable.

Copy link

@rikkix rikkix left a comment

Choose a reason for hiding this comment

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

If it is modified, the same type errors should also be modified.
I do not think this change is necessary and maybe it is not proper.

@vcptr
Copy link
Contributor Author

vcptr commented Aug 27, 2019

same type errors do not need to be modified, they ARE on WARNING level.
I didn't offer the idea of changing this out of no where, I just find that all protocol's outbound error all goes to WARNING level but vmess.

EG for h2 protocol

return nil, newError("failed to dial to ", dest).Base(err).AtWarning()

for kcp

return nil, newError("failed to dial to dest: ", err).AtWarning().Base(err)

You can say that they are different, that's because raw vmess protocol doesn't need a wrapper layer, the encode/decode invokes connection directly. From a user's view, if a connection error occured, vmess protocol firstly raised up error from the decoder. Thus, they are the same type error of CONNECTION PROBLEMS, which should be warned.

Copy link
Contributor

@xiaokangwang xiaokangwang left a comment

Choose a reason for hiding this comment

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

I think treat this error as warning is reasonable since its effect is fully visible to user(Connection not established) and contain diagnoses information.

@kslr kslr merged commit e9f5305 into v2ray:master Sep 7, 2019
@vcptr vcptr deleted the fixlevel branch October 30, 2019 04:38
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.

None yet

4 participants