Enhance Logging, Handshake Protocols, and UDP Session Management #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the NodePass project, focusing on logging enhancements, improved handshake protocols, and UDP session management. The most important changes include replacing the
fatal
log level withevent
, adding handshake timing metrics, and implementing reusable UDP sessions for better performance and resource management.Logging Enhancements:
fatal
log level withevent
across the codebase and documentation to better reflect operational events and traffic statistics. (cmd/nodepass/main.go
: [1]docs/en/configuration.md
: [2]docs/en/usage.md
: [3] [4] [5] [6]docs/zh/configuration.md
: [7]docs/zh/usage.md
: [8] [9] [10] [11]logger.Event
for broadcasting traffic statistics and operational events instead oflogger.Debug
. (internal/common.go
: [1] [2] [3] [4] [5]Handshake Protocol Improvements:
internal/client.go
: [1]internal/server.go
: [2]UDP Session Management:
sync.Map
to improve performance and reduce resource overhead. Added logic to clean up sessions when they are no longer needed. (internal/common.go
: [1] [2] [3]Codebase Updates:
logs
dependency to versionv1.0.1
to support the new logging features. (go.mod
: go.modL8-R8)Error Handling Improvements:
internal/common.go
: internal/common.goL719-R729)