Logic Machine Forum
username and password for socket.http.PROXY - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: username and password for socket.http.PROXY (/showthread.php?tid=4013)



username and password for socket.http.PROXY - rbourgeon - 25.04.2022

Hello,
I want to connect to a proxy that requires a Basic authentication.

In my script, I wrote something like this:
Code:
socket.http.PROXY = http://username:password@proxy_ip:proxy_port

But it doesn't work.

However it seems that the proxy Basic authentication seems to be implemented in the luasocket library since August 24th 2015 (see here on GitHub)
[Image: v1ODHTP.png]

does that mean that the luasocket version implemented in the LogicMachine is older than that?
  • If yes, would it be possible to update it to a newer version in the next firmware?
  • If no, what did I do wrong in my implementation?

Best regards


RE: username and password for socket.http.PROXY - admin - 25.04.2022

This was not implemented in our LuaSocket version. This will be added in the next firmware build.
A package update can be also provided if needed, what hardware version do you have?


RE: username and password for socket.http.PROXY - rbourgeon - 26.04.2022

(25.04.2022, 09:22)admin Wrote: This was not implemented in our LuaSocket version. This will be added in the next firmware build.
A package update can be also provided if needed, what hardware version do you have?

Thanks for your reply. The hardware version is the following: LM5 Reactor IO V2 (i.MX6)


RE: username and password for socket.http.PROXY - admin - 26.04.2022

Install through System config > System > Packages > Add (+):
https://dl.openrb.com/pkg/luasocket_2.0.2-20220425_imx6.ipk


RE: username and password for socket.http.PROXY - rbourgeon - 03.05.2022

Hello, unfortunately after installing the latest version of luasocket that you provided in the previous message, another error showed up:
Code:
error loading module 'ssl.core' from file 'Library ssl.so':
Error loading shared library libssl.so.1.1: No such file or directory (needed by Library ssl.so)
stack traceback:
[C]: at 0x00054b64
[C]: in function 'require'
Library ssl: in function <Library ssl:0>
[C]: in function 'require'
Library socket/http: in function <Library socket/http:0>
[C]: in function 'require'
User script:12: in main chunk

It seems to be a dependency issue, namely the library ssl.so is not present. Do you think it would be possible for you to compile us all the dependencies of this version of luasocket so we can effectively use it in the LogicMachine?


RE: username and password for socket.http.PROXY - admin - 03.05.2022

Do you have the latest firmware installed?


RE: username and password for socket.http.PROXY - rbourgeon - 15.06.2022

(03.05.2022, 14:16)admin Wrote: Do you have the latest firmware installed?

Indeed it works correctly with the latest firmware. The problem occurs only on machines with older firmwares.