Skip to content

Releases: tma/mbproxy

v1.4.0

Choose a tag to compare

@tma tma released this 17 Aug 20:44
ca2ab06

What's Changed

  • feat: forward vendor function codes by @tma in #14

Full Changelog: v1.3.0...v1.4.0

v1.3.0

Choose a tag to compare

@tma tma released this 03 Aug 19:56
7e36be5

v1.3 makes stalled or failing upstream Modbus devices safer to handle and easier to diagnose. The main changes are the bounded request handling from #10 and the production diagnostics from #11.

Safer upstream request handling

  • One end-to-end deadline now covers cache coalescing, queueing, connection setup, retries, and request pacing. Expired requests won't reach the upstream socket later.
  • Reads retry once after a transport failure. Writes are never retried when the device may already have applied them.
  • Genuine upstream Modbus exceptions keep their original exception code. Transport, framing, and deadline failures return gateway target failed to respond (0x0B).
  • Allowed writes invalidate affected cache entries before and after forwarding. In-flight reads can no longer repopulate pre-write values after a concurrent write.
  • Stale fallback is limited to upstream transport failures. It won't replace genuine Modbus exceptions or responses for requests that are already canceled or expired.

Configuration changes

Variable What changed Default
MODBUS_ATTEMPT_TIMEOUT New preferred per-attempt socket timeout 10s
MODBUS_REQUEST_TIMEOUT New total request budget across waiting, connection setup, retries, and pacing 30s
MODBUS_TIMEOUT Still supported as a deprecated alias for MODBUS_ATTEMPT_TIMEOUT unset

Existing configurations using MODBUS_TIMEOUT continue to work. If both attempt timeout variables are set, their parsed durations must match or mbproxy will fail at startup.

To leave enough time for the single read retry, set MODBUS_REQUEST_TIMEOUT high enough for two attempts, connection delays, request pacing, and dial time. The total request budget always caps each individual attempt.

MODBUS_REQUEST_DELAY now acts as the minimum interval between successful upstream requests. The pacing wait counts against the next request's budget and no longer delays a response that has already been received.

Diagnostics and health

Request lifecycle logs now include request identity, attempt counts, retry decisions, error classification, exception codes, and separate queue, attempt, reconnect, coalescing, and total durations. Write payloads are never logged.

The health response now reports retry counters, failure streaks, success timestamps, and degradation state. Recovered retries remain available over HTTP 200. Sustained first-attempt failures become degraded after one minute, while final upstream failures remain HTTP 503 unhealthy.

Other changes

  • Updated actions/checkout in #9.
  • Updated actions/setup-go in #12.

Full changelog: v1.2.0...v1.3.0

v1.2.0

Choose a tag to compare

@tma tma released this 14 May 20:05
a17c22f

What's Changed

  • chore(deps): bump the all-actions group with 5 updates by @dependabot[bot] in #7
  • refactor: per-register cache to fix stale data on writes by @tma in #8

Full Changelog: v1.1.2...v1.2.0

v1.1.2

Choose a tag to compare

@tma tma released this 11 Mar 07:49
4915499

What's Changed

  • Restore HTTP-based health server, make it opt-in by @tma in #6

Full Changelog: v1.1.1...v1.1.2

v1.1.1

Choose a tag to compare

@tma tma released this 10 Mar 08:21
9b12f3f

What's Changed

  • Remove local health port binding, check upstream directly, and fix Docker PR CI by @Copilot in #5

New Contributors

  • @Copilot made their first contribution in #5

Full Changelog: v1.1.0...v1.1.1

v1.1.0

Choose a tag to compare

@tma tma released this 05 Mar 08:09
  • Healthcheck added to Docker image: a057383

Full Changelog: v1.0.0...v1.1.0

v1.0.0

Choose a tag to compare

@tma tma released this 23 Jan 13:01
52606bd

Initial release

Full Changelog: https://github.com/tma/mbproxy/commits/v1.0.0