-
2.9-stable Stable
released this
2025-04-12 10:04:01 +02:00 | 2 commits to main since this releaseRelease Notes for 2.9-Stable
Key Highlights
- Improved Dual-Stack Support: Enhanced handling of IPv4/IPv6 configurations with the
forceprotocol
option (ipv4
,ipv6
,auto
) to address network inconsistencies and improve compatibility with dual-stack environments. - Enhanced Logging: Added detailed logging for network events and protocol configurations to simplify debugging and monitoring.
- Optimized Worker Scaling: Further improvements to auto-scaling workers for better performance under high load scenarios.
- Pre-Caching Enhancements: Improved pre-caching logic to ensure faster file access and reduced latency during startup.
- XEP-0363 Compliance Improvements: Verified and optimized behavior for HTTP file uploads to ensure compatibility with XMPP clients like Gajim and Dino.
Added
forceprotocol
configuration option to explicitly control network protocol usage (ipv4
,ipv6
,auto
).- Detailed logging for
forceprotocol
and network events to assist in debugging dual-stack issues. - Additional metrics for monitoring worker performance and upload/download statistics.
Changed
- Improved handling of dual-stack environments when
forceprotocol=auto
is set. - Enhanced auto-scaling logic for worker threads to better adapt to varying workloads.
- Updated documentation to include troubleshooting steps for common issues like
404 Not Found
errors and dual-stack conflicts.
Fixed
- Resolved issues with inconsistent behavior in dual-stack environments when both IPv4 and IPv6 were enabled.
- Addressed edge cases where pre-caching could fail under certain configurations.
- Fixed minor bugs in ClamAV scanning and deduplication workflows.
Upgrade Notes
- Go Version: Ensure you are using Go 1.24.0 or later.
- Configuration Changes: Update your config.toml file to include the new
forceprotocol
option:# Server configuration forceprotocol = "auto" # Options: "ipv4", "ipv6", "auto"
Known Issues
- None reported for this release.
For more details, refer to the updated Wiki Documentation and CHANGELOG.
Downloads
- Improved Dual-Stack Support: Enhanced handling of IPv4/IPv6 configurations with the
-
2.8-stable Stable
released this
2025-04-05 10:40:44 +02:00 | 10 commits to main since this releaseHMAC File Server – Release v2.8
What’s New
- Improved IP stack handling: keep-alive enabled by default and enforced HTTP/2 for smoother Android transitions.
- Simplified metrics registration to avoid any potential double-registration.
Bug Fixes
- Removed duplicated “/metrics” endpoint registration that previously caused conflicts.
- Reduced need for reconnecting on IP changes through longer idle connection settings.
Upgrade Notes
- If using custom metrics setups, verify you only register “/metrics” once.
- Keep-alive settings now default to a higher timeout. Confirm this aligns with your environment needs.
Downloads
-
released this
2025-01-26 09:18:48 +01:00 | 17 commits to main since this releaseHMAC File Server – Release v2.6
What’s New
-
Configurable Filenaming
- Added support for
filenaming=None
to skip the default HMAC-based renaming. - Allows users to keep the original filename instead of hashing, while preserving all HMAC authentication for security.
- Added support for
-
Enhanced Logging
- Improved log level usage (
info
,warn
,error
,debug
) across the login flow and file handling operations. - Added more structured fields (e.g.,
method
,remote
,url
) for easier log analysis. - Better security defaults to avoid exposing sensitive data in logs.
- Improved log level usage (
-
Prometheus Metrics Adjustments
- Refined counters, gauges, and histograms to cover all critical events (upload/download, dedup, ClamAV scanning).
- Ensured consistent increments for success/failure paths.
- Simplified registration to avoid double-registration issues.
-
Deduplication Improvements
- Confirmed that after moving a file to the dedup directory, a hard link is consistently created back to the original location.
- Logs now clearly indicate successful dedup steps and any errors.
-
Worker Pool Enhancements
- Better dynamic scaling logs (e.g., “Added worker. Total workers: X”).
- Ensures no duplicate or redundant worker creation.
- Additional metrics for worker adjustments and re-adjustments.
Bug Fixes
-
Resolved “File Not Found” During GET
- Clarified that when
filenaming=None
, the server does not rename files to HMAC paths, preventing mismatches between upload and download URLs. - Fixed potential race conditions in dedup moving vs. linking.
- Clarified that when
-
Reduced Log Noise
- Eliminated repetitive or misleading error messages around networking events.
- Improved clarity in ClamAV scanning logs to better distinguish scan failures vs. actual malware detections.
Upgrade Notes
- Config File:
- Check your
[server]
section forfilenaming
. If you previously relied on HMAC-based filenames, confirm whether you want to setfilenaming="HMAC"
explicitly.
- Check your
- Metrics:
- If you track Prometheus data, your dashboards may need to be updated for any renamed metrics or new labels.
- Logging:
- Logging defaults remain at
info
level. Increase todebug
only for troubleshooting to avoid excessive detail in production logs.
- Logging defaults remain at
Thank you to everyone who contributed feedback and testing for this release! As always, please report any issues, and we welcome suggestions to further improve the HMAC File Server. Enjoy the streamlined filenames, more comprehensive logging, and robust Prometheus metrics!
-
-
released this
2025-01-01 11:17:18 +01:00 | 31 commits to main since this releaseHMAC File Server 2.5-Stable
The HMAC File Server ensures secure file uploads and downloads with advanced HMAC authentication, file deduplication, and a suite of features tailored for secure, efficient, and flexible file management. This version introduces robust new capabilities, optimizations, and bug fixes, making it a must-have upgrade for existing users.
Special thanks to Thomas Leister for inspiration drawn from [prosody-filer](https://github.com/ThomasLeister/prosody-filer).
Overview
Key features of HMAC File Server 2.5-Stable include:
- HMAC-Based Security: Robust authentication for secure file transactions.
- Redis Integration: Enhanced caching and session management.
- ClamAV Virus Scanning: Secure file uploads with antivirus protection.
- Dynamic Worker Management: Optimized performance with auto-scaling worker threads.
- Prometheus Metrics: Detailed monitoring of file and system activity.
- ISO Containers: Advanced file handling options for diverse use cases.
Changelog
Added
- File Deduplication: Efficient storage using SHA256 hashing to prevent duplicate files.
- ISO Container Management: Create and mount ISO containers for specialized storage.
- Precaching Feature: Faster file access with a startup cache of frequently used files.
- Prometheus Metrics: Added deduplication and ISO operation monitoring.
- Redis Enhancements: Optimized metadata caching and state management.
- Dynamic Workers: Automatically adjusts worker threads based on system resources.
Changed
- Worker Pool Scaling: Improved performance with dynamic thread adjustment.
- Logging Enhancements: Detailed file operation logs, including MIME type data.
- Temporary Path Configuration: Configurable
TempPath
parameter for flexibility.
Fixed
- Temporary File Handling: Resolved
.tmp
file warnings with improved MIME detection. - MIME Type Detection: Enhanced accuracy during file uploads.
Removed
- Previous Thumbnail Support: Streamlined code by dropping outdated processes.
Installation and Setup
Installation
- Clone the repository:
git clone https://github.com/PlusOne/hmac-file-server.git cd hmac-file-server/cmd/server
- Build the binary:
GOOS=linux GOARCH=amd64 go build -o hmac-file-server main.go
- Create directories:
mkdir -p /path/to/hmac-file-server/{data,deduplication,thumbnails,iso}
- Configure and run:
cp config.example.toml config.toml ./hmac-file-server -config config.toml
Reverse Proxy
Nginx Configuration:
server { listen 80; server_name your-domain.com; location / { proxy_pass http://localhost:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }
Systemd Service
[Unit] Description=HMAC File Server After=network.target [Service] ExecStart=/path/to/hmac-file-server -config /path/to/config.toml Restart=always [Install] WantedBy=multi-user.target
Enable the service:
sudo systemctl daemon-reload sudo systemctl enable hmac-file-server sudo systemctl start hmac-file-server
Building
To cross-compile for other platforms:
GOOS=linux GOARCH=amd64 go build -o hmac-file-server-linux-amd64 main.go GOOS=linux GOARCH=arm64 go build -o hmac-file-server-linux-arm64 main.go GOOS=windows GOARCH=amd64 go build -o hmac-file-server-windows-amd64.exe main.go
Important Notes
- Upgrade Steps: Update
config.toml
with new fields likededuplication
andiso
to use the latest features. - Release Tag: Create a GitHub release with tag
v2.6.0
and updated release notes.
Enjoy streamlined, secure, and high-performance file management with HMAC File Server 2.5-Stable!
Downloads