All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
rest.Decode()helper for typed response unmarshaling — eliminates manual JSON re-encode/decode pattern- Login timeout for API Protocol — prevents hanging on unresponsive routers when
WithTimeoutis set
- Complete TLS/SSL certificate setup guide (
docs/TLS_SETUP.md) — CA generation, server cert, service assignment - Go code examples for TLS connections (API Protocol and REST API)
- Security best practices: IP restriction, disabling plaintext services, CA export for client trust
- ECDSA certificate alternative for RouterOS v7
- Split README from 868 to 231 lines — detailed docs moved to
docs/directory docs/REST_API.md— full REST API referencedocs/API_PROTOCOL.md— full API Protocol referencedocs/TLS_SETUP.md— RouterOS certificate setup guidedocs/MIGRATION.md— migration guide from routerosv7-restfull-api- Comprehensive inline code comments on all 14 source files (English US)
- Updated CONTRIBUTING.md with integration testing section
- Updated SECURITY.md with TLS best practices
- Verified all examples against real RouterOS devices:
- RouterOS 7.15 (stable) — CHR x86_64: API, API-SSL, REST HTTP, REST HTTPS
- RouterOS 6.49.19 (long-term) — x86: API, API-SSL
- Confirmed identical output format between v6 and v7
- Codecov integration with dynamic coverage badge
golangci-lintv2 job in CI pipeline- 100% coverage enforcement (fails CI if below 100%)
- Go 1.24 added to test matrix
- Windows added to test matrix (ubuntu, macos, windows)
go mod verifydependency audit step
- REST client: handle HTTP 204 No Content on DELETE — RouterOS returns empty body on successful delete, which caused
EOFerror indecodeJSONBody - REST client: rename
shouldRetryTlsErrorRequest→shouldRetryTLSErrorRequestfor idiomatic Go naming - API client: suppress
errcheckwarnings onSetDeadlineandReadSentencecalls - proto/writer: suppress
errcheckwarnings on buffered write operations - golangci-lint: update config to v2 format
- Bump
actions/checkoutfrom v4 to v6 - Bump
actions/setup-gofrom v5 to v6 - Bump
codecov/codecov-actionfrom v5 to v6 - Bump
github.com/stretchr/testifyfrom v1.8.4 to v1.11.1
ClientwithNewClient()and functional options (WithInsecureSkipVerify,WithTimeout,WithHTTPClient)- CRUD methods:
Auth,Print,Add,Set,Remove,Run - Request options:
WithProplist,WithQuery,WithFilter - Structured error type
APIErrorwithStatusCode,Message,Detail - Automatic HTTPS/HTTP protocol detection with TLS fallback
- Context support for cancellation and timeouts
ClientwithDial()and functional options (WithTLS,WithTLSConfig,WithTimeout)- CRUD methods:
Auth,Print,Add,Set,Remove,Run - Request options:
WithProplist,WithQuery - Structured error types:
DeviceError(trap) andFatalError - Auto-detect authentication (pre/post-6.43 RouterOS)
- MD5 challenge-response login for legacy RouterOS
- Context deadline support for TCP operations
!emptyreply handling (RouterOS 7.18+)
- Binary length-prefix encoding/decoding (1-5 byte variable length)
Sentence,Pairstructs for structured dataReaderandWriterfor wire format I/OParseWordfor API word parsing
- Comprehensive README with both packages documented
- Usage examples for REST and API Protocol
- Godoc example functions for pkg.go.dev
- Thread safety documentation
- GitHub Actions workflow (Go 1.21/1.22/1.23, Ubuntu/macOS/Windows)
- 100% test coverage across all packages
- golangci-lint integration