fix: cert check on connect, force IPv4, remove hardcoded IP from bridge.sh #63

Closed
p2l wants to merge 1 commits from p2l/KX-Bridge-Release:feature/bridge-fixes into master
Contributor

Three small housekeeping fixes to kobrax_client.py and bridge.sh:

  • Cert existence check: raise a clear FileNotFoundError with a helpful message when anycubic_slicer.crt/.key are missing, rather than surfacing a cryptic SSL error deep in the TLS handshake
  • Force IPv4: use getaddrinfo(AF_INET) before create_connection in two places — prevents connection failures on dual-stack networks where the printer hostname resolves to an IPv6 address the printer does not listen on
  • bridge.sh: comment out the hardcoded PRINTER_IP="192.168.178.94" — this was shipped as the upstream default and confuses new users who copy the script without realising it contains someone else's LAN address
Three small housekeeping fixes to `kobrax_client.py` and `bridge.sh`: - **Cert existence check**: raise a clear `FileNotFoundError` with a helpful message when `anycubic_slicer.crt`/`.key` are missing, rather than surfacing a cryptic SSL error deep in the TLS handshake - **Force IPv4**: use `getaddrinfo(AF_INET)` before `create_connection` in two places — prevents connection failures on dual-stack networks where the printer hostname resolves to an IPv6 address the printer does not listen on - **bridge.sh**: comment out the hardcoded `PRINTER_IP="192.168.178.94"` — this was shipped as the upstream default and confuses new users who copy the script without realising it contains someone else's LAN address
p2l added 1 commit 2026-06-18 21:43:21 +02:00
- Raise FileNotFoundError with clear message when TLS certs are missing
  rather than a cryptic SSL error
- Use getaddrinfo(AF_INET) before create_connection to force IPv4 and
  avoid dual-stack resolution failures on some networks
- Comment out hardcoded PRINTER_IP in bridge.sh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
p2l closed this pull request 2026-06-18 21:47:38 +02:00
Author
Contributor

woah, should have rebased first! Closing.

woah, should have rebased first! Closing.

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: viewit/KX-Bridge-Release#63
No description provided.