aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-06-29Fix IPv6 address parsing in IP extractionJeff Halter
Replace string splitting with net.SplitHostPort to properly handle both IPv4 and IPv6 addresses. Fixes issue where IPv6 addresses like [::1]:8080 were incorrectly parsed as "[" instead of "::1".
2025-06-29Merge branch 'feature/extract-error-constants'Jeff Halter
2025-06-29Fix tests modifying test fixture files by using temporary directoriesJeff Halter
Previously, running tests would modify test/config/Users/guest.yaml and create test/config/Users/test-user.yaml due to the automatic migration logic in YAMLAccountManager. This caused git diff to show changes after running tests. Solution: - Modified TestNewYAMLAccountManager to use t.TempDir() for test isolation - Added copyTestFiles helper to copy test fixtures to temporary directory - Tests now run against copies, leaving original fixtures untouched This ensures tests are properly isolated and don't have side effects on the repository's test fixture files.
2025-06-29Extract hardcoded error strings into comprehensive public constantsJeff Halter
Replace 60+ hardcoded error strings throughout transaction handlers with public constants and templates for consistent error handling across the Hotline protocol implementation. Features: - 33 authorization error constants (ErrMsgNotAllowed*) - Account operation error constants (ErrMsgAccount*) - File operation error templates with filename parameters (ErrMsgCannot*) - Upload/download restriction templates (ErrMsgUpload*) - Ban message constants (ErrMsgTemporaryBan, ErrMsgPermanentBan) - General error constants (ErrMsgUserNotFound, ErrMsgCreateAlias) - Chat/messaging templates (ErrMsgDoesNotAcceptTemplate) Benefits: - Single source of truth for all error messages - Public API for other packages to import standard error constants - Sprintf-style templates for dynamic content (filenames, usernames) - Clear distinction between protocol errors (ErrMsg*) and golang errors - Improved maintainability and consistency across transaction handlers All error messages are now centralized, making future modifications easier and ensuring consistent user experience across all operations.
2025-06-28Update Homebrew workflow to also update URL fieldJeff Halter
2025-06-28Add automated Homebrew formula updates on releaseJeff Halter
2025-06-28Add comprehensive documentation to transaction handler functionsJeff Halter
- Document all transaction handler functions with detailed field specifications - Include request and reply field descriptions with required/optional indicators - Add field numbers and descriptions for easy protocol reference - Remove duplicate comments while preserving important context - Standardize documentation format across all handler functions
2025-06-26Refactor FormattedPath to use scanner interface and add comprehensive testsJeff Halter
- Replace manual byte slicing with bufio.Scanner for safer parsing - Add pathSegmentScanner implementing bufio.SplitFunc pattern - Add comprehensive table tests covering edge cases and special characters - Improve code safety with proper bounds checking - Follow established codebase patterns for binary data parsing
2025-06-26Replace filepath.Join with path.Join for Windows compatibilityJeff Halter
Replace all instances of filepath.Join with path.Join across the codebase to improve Windows compatibility following the guidance from https://github.com/golang/go/issues/44305. Key changes: - Replaced filepath.Join with path.Join in 14 files - Updated import statements appropriately - Resolved variable shadowing issues where function parameters named 'path' were conflicting with the path package - Maintained filepath imports where needed for OS-specific functions like filepath.Walk, filepath.IsAbs, filepath.Dir, and filepath.Base All tests pass, confirming the changes maintain functionality while improving cross-platform compatibility.
2025-06-25Fix critical bug in YAMLAccountManager Update methodJeff Halter
Move delete operation before modifying account.Login to prevent deleting wrong key from accounts map.
2025-06-25Refactor copyDir and findConfigPath functions in main.goJeff Halter
- Refactor copyDir: Add proper error handling, resource cleanup with defer, true recursion, better permissions (0755), and separation of concerns - Refactor configSearchPaths -> findConfigPath: Add directory validation, better naming, and clearer documentation - Add comprehensive test suite for all functions with 100% test coverage - Remove panic in copyDir, replace with proper error propagation - Fix resource leaks by using defer for file cleanup
2025-06-25Ignore .claudeJeff Halter
2025-06-19Ensure temporary upload files are closed before renameJeff Halter
This seems to be important on Windows! See #161
2025-05-22Update transaction_handlers.goTheo Knez
2025-05-22Update api.goTheo Knez
2025-05-22Update server.goTheo Knez
2025-05-22Update go.sumTheo Knez
2025-05-22Update go.modTheo Knez
2025-05-22Update main.goTheo Knez
2025-02-06Bump Golang version in DockerfileJeff Halter
2025-02-06Account for 16 vs 32 bit integers in folder uploadRuben Beltran del Rio
2024-11-24Bump Go and dependency versions to latestJeff Halter
2024-10-06Update README.mdJeff Halter
Fix documentation error
2024-10-06Fix tracker resultsJeff Halter
2024-08-07Update README.mdJeff Halter
Fix documentation of --api-addr flag
2024-08-04Delete cmd/mobius-hotline-server/mobius/config/Files/hello.txtJeff Halter
2024-08-04Create About This Area.txtJeff Halter
2024-07-31Migrate user account yaml files to new Access flag format if neededJeff Halter
2024-07-30Fix commentsJeff Halter
2024-07-28Fix tracker registration loggingJeff Halter
2024-07-28Improve human readability of account config filesJeff Halter
2024-07-27Fix missing version in Docker and Makefile buildJeff Halter
2024-07-27Add logging of tracker registrationJeff Halter
2024-07-26Make Bonjour optional and disabled by defaultJeff Halter
Bonjour doesn't seem happy inside Docker, so I'm making it optional and off by default.
2024-07-26Limit guest permissionsJeff Halter
Limit default guest permissions to: File System Maintenance * Can Download files * Can Download folders * Can Upload Files * Can Upload Folders Messaging * Can Send Messages News * Can Read Articles * Can Post Articles Chat * Can Initiate Private Chat * Can Read Chat * Can Send Chat Misc * Can Use Any Name
2024-07-26Register server address on local network with BonjourJeff Halter
2024-07-25Wrap file transfer errors with more contextJeff Halter
2024-07-23Add client connection rate limitJeff Halter
2024-07-23Fix panic on empty news pathJeff Halter
2024-07-22Update README.mdJeff Halter
Correct docker image path
2024-07-21Update README.mdJeff Halter
Remove references to the client, which has been split off to separate project repo
2024-07-21Clean up loggingJeff Halter
2024-07-19Add option for account-specific file rootJeff Halter
2024-07-19Appease linterJeff Halter
2024-07-19Fix failing test, replace use of reflect package with assertJeff Halter
2024-07-18Add support for trackers that require a passwordJeff Halter
2024-07-18Add initial HTTP API endpointsJeff Halter
2024-07-17Extensive refactor, quality of life enhancementsJeff Halter
* Added ability to reload config, agreement, news, and user accounts without restarting the server by sending SIGHUP to the running process * Added ability to use modern unix or windows line breaks in Agreement.txt and MessageBoard.txt instead of classic MacOS `\r` breaks. * Extensive refactor towards swappable backends for the active server state * Extensive refactored towards making the hotline package generic and re-usable for alternate server implemenations * Fix bug where users whose accounts have been deleted would not be disconnected
2024-07-14Delete docs/Screenshot 2024-05-03 at 4.40.09 PM.pngJeff Halter
2024-07-14Create go-proxy-warmingJeff Halter
Add go doc proxy marking workflow: https://github.com/marketplace/actions/go-proxy-warming