Skip to content

Conversation

yosebyte
Copy link
Owner

@yosebyte yosebyte commented Jun 6, 2025

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 with event, adding handshake timing metrics, and implementing reusable UDP sessions for better performance and resource management.

Logging Enhancements:

  • Replaced the fatal log level with event 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]
  • Updated various logging calls to use logger.Event for broadcasting traffic statistics and operational events instead of logger.Debug. (internal/common.go: [1] [2] [3] [4] [5]

Handshake Protocol Improvements:

  • Enhanced handshake protocols for both client and server, adding timing metrics to measure handshake duration and ensuring proper acknowledgment between endpoints. (internal/client.go: [1] internal/server.go: [2]

UDP Session Management:

  • Implemented reusable UDP sessions using 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:

  • Updated the logs dependency to version v1.0.1 to support the new logging features. (go.mod: go.modL8-R8)

Error Handling Improvements:

  • Improved error handling messages for better clarity, such as specifying reasons for connection failures. (internal/common.go: internal/common.goL719-R729)

@yosebyte yosebyte merged commit 61285e4 into yosebyte:main Jun 6, 2025
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.

1 participant