OPC UA ReverseConnect Client Implementation #1944
AndreasHeine
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
OPC UA ReverseConnect Client Implementation
Goal
Add client-side support for Server-initiated TCP transport (ReverseConnect) while keeping existing outbound client behavior unchanged.
1. Protocol Layer Changes
ReverseHellomessage type (RHE) and struct.ReverseHello.ReverseHellocan be received beforeHello/Acknowledge.Files to touch:
asyncua/ua/uaprotocol_hand.pyasyncua/ua/ua_binary.pyasyncua/common/connection.py2. Reverse Handshake State Machine
Implement a reverse handshake path:
ReverseHello.ServerUriand optional endpoint policy.Hello.Acknowledge.OpenSecureChannel.Enforce protocol constraints:
Hello/Acknowledgeonly once per transport.Primary file:
asyncua/client/ua_client.py3. Client Listener Mode
Add a listener mode for the client:
asyncio.start_server) for ReverseConnect.ErrorMessage(BadServerTooBusy)and close.Likely files:
asyncua/client/ua_client.pyasyncua/client/client.py(public configuration/API)4. High-Level API & Config
Add explicit ReverseConnect configuration:
Integrate into existing flows:
connect()connect_sessionless()_prepare_reconnect_transport,_reconnect_loop)Primary file:
asyncua/client/client.py5. Reconnect & Lifecycle Integration
Adapt reconnect logic so reverse mode:
Hello/Acknowledge/OpenSecureChannel.Primary files:
asyncua/client/client.pyasyncua/client/ua_client.py6. Security & Validation
ReverseHello.ServerUriagainst policy/allow-list.OpenSecureChannelexactly as current flow.7. Testing Plan
Add tests for:
ReverseHelloencode/decode.Hello/Acknowledgehandling.BadServerTooBusyresponse under resource pressure.Likely test files:
tests/test_connections.pytests/test_reverse_connect.py)8. Rollout Strategy
RHEparsing/serialization).UaClient.ClientAPI and reconnect wiring.9. Minimum Viable Feature (first merge)
10. Done Criteria
ReverseHello -> Hello -> Acknowledge -> OpenSecureChannel -> CreateSession -> ActivateSession.Beta Was this translation helpful? Give feedback.
All reactions