Support for https using QNetworkAccessManager. Hitting SslErrors at runtime - qt

I am performing a https get operation with QNetworkAccessManager. I am hitting SSLErrors at runtime.
After researching for a while I was able to get my program running after installing OpenSSL. I required two dlls: libeay32.dll and ssleay32.dll. Is it to say that I cannot perform https "get" operation using QNetworkAccessManager without OpenSSL ?? Doesn't Qt support native https support using QNetworkAccessManager.
Thanks,
De Costo.

Had to install the following dll's found at the following website to my machine:
http://www.slproweb.com/products/Win32OpenSSL.html
The encryption is guarded closely by the nationality. So, More info at:
http://developer.qt.nokia.com/faq/answer/how_can_i_add_ssl_support_to_my_qt_application

Related

ACORE API, assistance with errors and deployment

I'm having trouble with setting up ACORE API's and then having them work on a website.
Background:
Azerothcore running 3.3.5 on a debian standalone server, this has the Database, Core files and runs both the world and auth server basically a standard setup that is shown in the how-to wiki.
I also have a standalone web server, on the same subnet, but it's a separate server running linux and normal web server stuff, this has a wordpress installation with azerothcore plugin for user signup etc.
I'm trying to add the player map (https://github.com/azerothcore/playermap) and the ACORE-API set of functions (server status, arenastats, BG que and wow statistics) (https://github.com/azerothcore/acore-api)
Problem:
I understand the acore-api must be run in a container (docker or whatever) on the server, which I have done and it binds to port 3000, I can then go to the local ip:3000 and it brings up this error. (all db's etc are connecting and soap is working)
error 404 when navigating to IP:3000
I do get a few errors when running NPM install seen here: I'm not sure if they would be causing any issues or not.
screenshot of NPM errors on install
But further that, when I put say 'serverstatus' on the webserver (separate server) and configure the config.ts file I can't seem to get anything to display.
I'm not sure what I'm doing wrong but is the same scenario for all of the different functions for the acore-api
How are these meant to be installed and function? I feel I'm missing a vital step.
Likewise, with PLAYERMAP I have edited the comm_conf.php and set the realmd_id, but when loading the page, I do get the map, but the uptime is missing and no players are shown?
Could someone assist if possible?
Seems like an issue with NodeJS version. Update your NodeJS to latest LTS version 16.13.0 (https://nodejs.org)

Running a Go webserver behind Phusion Passenger

Phusion Passenger has a great ecosystem for running webapps behind a webserver. I have experience with it from Ruby and Node.js apps. Now I rewrote a webservice to use Go, and it's time to deploy it. It seems natural to put Passenger+Nginx in front of the go webserver (using net/http). Searching around it seems that nobody has tried this, or asked about this anywhere...
I can't seem to find a configuration option to attach a custom binary, instead of passenger_ruby/passenger_node etc.
Can (should?) I use Phusion Passenger to run my binary created using go build?
No, you can't. Passenger doesn't actually use HTTP internally; it uses a custom protocol (like FastCGI or SCGI but incompatible with both) to communicate with your app and requires its own code in the application for management and dispatching requests. They don't provide such support code for Go.
This is actually possible now, Passenger 6 has added generic language support. You can find the tutorial here: https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html
Basically:
Compile your Go program and put the binary somewhere convenient. The application needs to accept configuration to choose what port to run on.
passenger start --app-start-command 'env PORT=$PORT ./main' assuming main is your program name.
Passenger will try to tell the application what port to start on so that it can have port 80/443.

HTTP service in AR1220

I have a router AR1220 VRP V200R001C01SPC500. I'm trying to enable the http service to configure this way, but the command doesn't exist. It a problem with the version? from which version are available this feature?
I've recently manage to configure web mgmt on 2 AR1200 with this version:
AR1200 V200R002C01SPC200
you can download it from support - is general available.
I know that some earlier versions support web mgmt but in chinese so i think you should download and upgrade to AR1200 V200R002C01SPC200 in order to be sure.
Best Regards

Hosting asp.net on mono xsp - raspberry pi

I'm trying to run the sample application that comes with xsp package on my Raspberry Pi (running arch linux), but unfortunately apparently the connection is closed before any http response is sent to the browser. I get on chrome the "NO DATA RECEIVED" message.
xsp however just outputs "Application_Start" and nothing else happens (other than chrome saying no data received)
Here's what I do:
$ xsp2
xsp2
Listening on address: 0.0.0.0
Root directory: /srv/http/test
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
Application_Start
And Chrome's output:
No data received
Unable to load the webpage because the server sent no data.
Here are some suggestions:
Reload this webpage later.
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
Of course on my Linux PC box it runs fine.
If anyone got any insights other than I'm trying to take too much out of my $35 board, let me know?
For the information of whoever visits this page:
Raspberry pi does not have an official mono implementation on hard float operations. That's why a lot of mono stuff will NOT work, including xsp =]
A gentleman posted on raspberry pi forums an experimental version of mono with an implementation of hard-float which form me worked fine. The post is here.
For Arch Linux users, I've come up with a package build so that you can create an arch linux package, and posted on the same thread. Exactly here. Instructions on how to build it are also there.
Running xsp will work after this, at least for me it did. I also did use .NET to handle GPIO and all worked beautifully.
Hopefully this helps! =]
With a bit of reflection and a socket server it's not that hard to create your own asp.net host (well I got it to support <% %> syntax with code behind and user controls (don't use/want the built in controls since they are less portable and not as transparent as I'd like)). Works fine on my arch berry.
Or you could try the self hosting from MS http://www.asp.net/web-api/overview/hosting-aspnet-web-api/self-host-a-web-api, not sure if it works with mono though (but do let us know if it does ;)).
If you are using the Raspbian distribution the Mono packages are having issues compiling and the ones that are out there have issues running .Net applications because of the specific processor features Raspbian takes advantage of. You have to use the older Debian that does not use the Hard Float armhf.
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=11634&start=75

QT: ssl https craches my dll, throws IniterrorSystem.DllNotFoundException

I've created a simple dll in qt which starts up a new thread and handles different network request with the QNetworkAccessManager. Working with ordinary HTTP requests works fine but I've gotten some problems when trying to start using HTTPS instead.
I've installed openssl and configured qt to use it with:
-openssl -I C:\OpenSSL\include -L C:\OpenSSL\lib
I can compile the dll but when I try to access the dll from my application I get a IniterrorSystem.DllNotFoundException.
This error appears as soon as I try to use the QSslSocket class, for example I'm just trying to initiate a variable.
QSslSocket socket;
With this initiation the dll crashes with the above error.
//QSslSocket socket;
removing the init will let the dll continue but the https request doesn't work and I don't get any error message from the QNetworkAccessManager. I tried connecting to the sslError signal but that never happens as well.
I've put the dlls "libeay32.dll", "libssl32.dll" & "ssleay32.dll" in the same folder as my dll and have OpenSSL successfully installed.
Anyone have any Idea what I'm missing?
Do you have the Visual C++ Runtime Libraries installed? OpenSSL depends on the msvcr dll on Windows.

Resources