aboutsummaryrefslogtreecommitdiff
path: root/hotline/server.go
AgeCommit message (Collapse)Author
2025-11-22Add optional TLS support for encrypted client connectionsJeff Halter
- Add TLSConfig and TLSPort fields to Server struct - Add WithTLS option function for configuration - Add ServeWithTLS and ServeFileTransfersWithTLS methods - Update ListenAndServe to start TLS listeners when configured - Add -tls-cert, -tls-key, -tls-port command-line flags - Fix data race in rateLimiters map access with mutex - Add TLS documentation with certificate generation instructions
2025-07-05Fix string splitting bug and add comprehensive tracker registration testsJeff Halter
- Fix critical bug in tracker address parsing: strings.Split(t, ":") instead of strings.Split(":", t) - Add dependency injection for TrackerRegistrar to improve testability - Extract registerWithAllTrackers() helper function to eliminate code duplication - Add comprehensive test suite covering: * Unit tests for parseTrackerPassword with edge cases and special characters * Integration tests for registerWithTrackers with mocking * Context cancellation and graceful shutdown testing * Error handling for network failures and malformed addresses * Edge cases like zero ports, long names, and empty configurations - Improve password parsing to handle colons in passwords correctly - Add MockTrackerRegistrar for isolated testing without network dependencies The string splitting bug would have prevented tracker registration from working with password-protected trackers. All tests pass and verify the fix works correctly.
2025-07-04Fix file handle close warnings by ignoring return valuesJeff Halter
Updated all file close operations to use anonymous functions that ignore return values to satisfy golangci-lint errcheck warnings.
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-05-22Update server.goTheo Knez
2025-02-06Account for 16 vs 32 bit integers in folder uploadRuben Beltran del Rio
2024-07-28Fix tracker registration loggingJeff Halter
2024-07-27Add logging of tracker registrationJeff Halter
2024-07-25Wrap file transfer errors with more contextJeff Halter
2024-07-23Add client connection rate limitJeff Halter
2024-07-21Clean up loggingJeff Halter
2024-07-19Add option for account-specific file rootJeff 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-09Extensive refactor and clean upJeff Halter
2024-06-24Refactoring, cleanup, test backfillingJeff Halter
2024-06-17Clean up various linter warningsJeff Halter
2024-06-16Fix broken io.Reader implementationsJeff Halter
2024-06-15Replace hardcoded version with ldflag usageJeff Halter
2024-06-15Refactoring and cleanupJeff Halter
* Split CLI client into separate project * Convert more functions to follow common Golang idioms e.g io.Reader, io.Writer * Use ldflags for versioning * Misc cleanup and simplification
2024-06-10Replace zap logger with slogJeff Halter
2024-06-10Read banner once at startupJeff Halter
2024-06-09Convert more bespoke methods to io.Reader/io.Writer interfacesJeff Halter
2024-06-09Replace custom slice concat func with slices.ConcatJeff Halter
2024-06-08Add support for account login renameJeff Halter
2024-06-01Fix account management edge casesJeff Halter
2024-04-04Add support for Mac Roman character encoding.Jeff Halter
https://en.wikipedia.org/wiki/Mac_OS_Roman
2024-04-01Fix handling of absolute paths in FileRoot config fieldJeff Halter
2024-03-28Add cmdline flag to specify network interfaceJeff Halter
2023-05-28Misc minor cleanup and linter appeasementJeff Halter
2023-04-23Make UserFlags publicJeff Halter
2023-04-19Ran 'golangci-lint run -E gocritic,whitespace --fix' 🤞Jeff Halter
2023-04-19Downcase fs var nameJeff Halter
2023-04-19Replace deprecated iotuil usageJeff Halter
2023-03-26Initial refactor to split client from protocol packageJeff Halter
2023-03-18Disconnect banned users earlier in the login flowJeff Halter
2023-01-21Fix regression in 1.5 login behaviorJeff Halter
2023-01-18Improve third party client compatabilityJeff Halter
2023-01-18Fix threaded news bugsJeff Halter
1. Fix handling of article IDs sent as 4 bytes instead of 2 2. Fix incorrect article count listing that strangely only affects third party clients
2023-01-10Improve compatibility with Obsession clientJeff Halter
2022-11-21Minor improvements to sendTransactionJeff Halter
1. Remove use of defer for the unlock because it make hold the mutex longer than necessary 2. Remove shadowed err var on L166
2022-11-21Fix mutex lock bug on invalid clientJeff Halter
2022-11-08Fix overwrite of user info due to buffer re-useJeff Halter
2022-11-07Add workaround for Windows file transfer errorsJeff Halter
2022-11-07Improve Frogblast client compatibilityJeff Halter
2022-09-15Clean up some linter warningsJeff Halter
2022-07-04Add basic stat countersJeff Halter
2022-07-03Implement handing for "Refuse Private Chat" preferenceJeff Halter
2022-07-03Minor cleanupJeff Halter