Optimize performance and enhance security with automated release workflow#386
Open
aa51513 wants to merge 2 commits intodswd:masterfrom
Open
Optimize performance and enhance security with automated release workflow#386aa51513 wants to merge 2 commits intodswd:masterfrom
aa51513 wants to merge 2 commits intodswd:masterfrom
Conversation
Performance Improvements: Implement radix trie for CIDR-based routing table lookups (O(n) → O(prefix_len)) Optimize traffic statistics hot path using get_mut() fast path Replace Cursor with direct array indexing in packet parsing Use heap allocation for MsgBuffer to reduce stack pressure (64KB → 32 bytes on stack) Security Enhancements: Increase PBKDF2 iterations from 4,096 to 600,000 (OWASP recommendation) Add input validation for init messages to prevent DoS attacks (max 64KB field length) Code Quality: Add documentation for magic numbers (ROTATE_INTERVAL, NONCE_LEN, MAX_FAILED_RETRIES) Improve error handling by replacing unwrap() with proper error propagation in GenericCloud::new Files Modified: src/table.rs: Implement ClaimTrie for O(prefix_len) lookups src/traffic.rs: Optimize hot path performance src/payload.rs: Direct array indexing for faster parsing src/util.rs: Heap-allocate MsgBuffer buffer src/crypto/common.rs: Increase PBKDF2 iterations src/crypto/init.rs: Add input validation and documentation src/cloud.rs: Improve error handling src/main.rs: Adapt to new error handling interface All changes maintain backward compatibility and existing functionality.
Changes: Add .github/workflows/release.yml for automated releases triggered by v* tags Support optional GPG signing - skip gracefully when GPG_PRIVATE_KEY is not configured Support optional crates.io publishing - skip when CARGO_REGISTRY_TOKEN is not configured Supported architectures: Packages: amd64.deb, i386.deb, arm64.deb, armhf.deb, armel.deb, x86_64.rpm, i686.rpm Static binaries: static_amd64, static_i386, static_arm64, static_armhf, static_armel How to trigger: git tag v1.2.3 git push origin v1.2.3 GitHub Secrets configuration: Secret Required Description GITHUB_TOKEN Auto Automatically provided by GitHub GPG_PRIVATE_KEY Optional GPG private key for signing (skip if not set) GPG_PASSPHRASE Optional GPG key passphrase CARGO_REGISTRY_TOKEN Optional crates.io API token (skip publish if not set) Generate GPG key (if needed): gpg --full-generate-key gpg --list-secret-keys --keyid-format=long gpg --armor --export-secret-keys YOUR_KEY_ID
Owner
|
Thanks for the PR. I will have to run the numbers to see what the actual performance increase is but it looks like it can't hurt. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.