Standalone HTTP-HTTPS gateway?

Albert LaFrance

Lifetime Supporting Member
Join Date
Mar 2012
Location
Falls Church, VA
Posts
120
I'm using a Do-More BRX to push data to a shared server via HTTP Post, and receive commands from the server in the response. It's not a critical application, but I'd like to upgrade to HTTPS. Unfortunately TLS handshaking on the BRX is slow; the total transaction time (request sent to response received) is in the 8-14 second range with HTTPS, versus about 1 second with HTTP.

So I'm wondering, does anyone make a "black box" gateway/adapter/router/whatever that would sit between the PLC and the network, transparently converting outgoing HTTP requests to HTTPS, and the reverse for responses?
 
And here is a Python script that should do the proxy i.e. relay the HTTP request from the BRX HTTP client to an HTTPS server, and then relay the HTTPS response from the HTTPS server to the BRX HTTP client.
 
Thank you very much for that suggestion! I don't know Python but I was able to implement it easily in a few lines of PHP. It's working perfectly - I'm getting round-trip response times consistently well under one second.
 
Sweet!


Can you post the code? It might help someone in the future.


Also, what environment (hardware, OS) are you running it on?
 
Sweet!


Can you post the code? It might help someone in the future.


Also, what environment (hardware, OS) are you running it on?

Sure, I'm attaching the code (remove the .txt extension). It needs some improvements like error handling, but it at least shows what's possible.

It's running on a Raspberry Pi 4 (2 GB) with the standard Raspberry Pi operating system, Apache server, and PHP. The only changes I made to the default installation were:

(1) assigning a static IP address in /etc/dhcpd.conf

(2) disabling wi-fi and Bluetooth by adding the following lines to the [all] section of /boot/config.txt:

dtoverlay=disable-wifi
dtoverlay=disable-bt
 

Similar Topics

Hi all. Customer wants analog faceplates really bad, even if we explained that it doesn't make much sense in his process. What he wants to see...
Replies
5
Views
129
I want to monitor a couple signals in a place where there is no PLC but there is ethernet. I know I can use an AENTR or Flex I/O and a module but...
Replies
21
Views
793
This is kind of a beginner question. Let say I have 2 Rockwell PLC talking to an InTouch standalone installation. Let call them G1_PLC and...
Replies
9
Views
1,157
*VMWare vCenter Converter Standalone version 6.3 & 6.4 Hello Experts I want to convert my current physical hardware machine to a virtual...
Replies
2
Views
1,624
Hi Friends, I am setting up Panel PCs to run SE Standalone, and I have some questions that I was wondering if anyone here could answer from...
Replies
2
Views
1,076
Back
Top Bottom