News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

DebugCenter communication over the Net

Started by Biterider, November 12, 2023, 02:57:55 AM

Previous topic - Next topic

Biterider

Hi everyone
I have added a very important feature to the DebugCenter application. Now it is possible to communicate with it using HTTP over a network. This opens up some new exciting and useful possibilities. For example, DebugCenter.exe can run on one machine while the debuggee/client is running elsewhere on the network. Not only can it be used for debugging purposes, but logging or important notifications can also be transferred.

Its use requires that the firewalls installed in the network allow this communication. In this case, DebugCenter uses port 8080, but this can easily be reconfigured if desired. Under Windows you have to create a new rule for incoming messages (Application, TCP, Port) using firewall.cpl on the machine where DebugCenter should run.

To register a listening URL, the underlying Http.sys driver requires elevated rights. This means that you must run DebugCenter as an administrator or that you must execute a NetSh command once from an elevated command console:
netsh http add urlacl url=http://+:8080/ user=%USERDOMAIN%\%USERNAME%
The new DebugCenter version 2.3.0 is available with all changes to Debug.inc and Co. on GitHub. I have tested it on 2 different networks, but would like to test it over the web. I would like to ask if someone would test it with me. Preferably someone in the same or similar time zone (UTC +1) as me.  :biggrin:

Thanks.
Biterider

PS: run the "RegURL_RunAsAdmin.cmd" file as admin to register the URL

Biterider

Hi
When testing the netsh script in a different environment, I noticed something important. The domain and user you specify in the script MUST match the one you want to run DebugCenter with.

user=%USERDOMAIN%\%USERNAME%
only works if the logged-in user has administrator rights.

Biterider

Biterider

Hi
It's done, it works  :cool:
The problem I had was not the new DebugCentre code, but a network problem. I ran the DebugCenter on my machine and tested it from another machine on the same local network. Everything was fine, but when I used my external IP address, nothing worked on either my computer or the other one. I tried all possible router and firewall settings (forwarding, triggering, DMZ, ...), nothing worked.
Searching the internet I found this  https://superuser.com/questions/1611424/cant-connect-to-my-public-ip-from-other-machine-in-same-local-network which gave me an indication that not all routers can handle this situation properly. 
I activated my old laptop and gave it hotspot from my mobile and voilá, it worked.  :greenclp:

Today I learnt a very important lesson in networking!  :eusa_dance:

Biterider