PDA

View Full Version : NetworqDebugger



wysota
10th September 2010, 14:10
NetworqDebugger is a simple tool for software developers that makes it easy to debug networking applications. It provides a proxy that will sit between your software and a remote server and display the conversation between them in GUI.

You can choose from two different modes of operation:

SOCKS5
This is the recommended mode of operation that is compliant with SOCKS5 protocol. Every application that supports SOCKS5 (such as most web browsers) can use it just by activating the proxy setting in the software. It is also easy to use it in case of your own Qt software - just create a network proxy settings object and use it for your application:

QNetworkProxy proxy(QNetworkProxy::Socks5Proxy, "127.0.0.1", 8080));
QNetworkProxy::setApplicationProxy(proxy);

Also remember to make sure the proxy setting for your actual sockets is correct (i.e. set to QNetworkProxy::DefaultProxy which is the default).

Transparent proxy
This is a fallback mechanism if you can't use SOCKS5. In this case instead of connecting to the remote end, your application connects to the proxy and the proxy makes a connection for you to the remote server based on the address you specify in NetworqDebugger. The address can be specified globally for all connections ("Default route") or can be input when the connection is being established ("Ask for route").

For example, if you want to debug your web browser by checking how it communicates with http://www.qtcentre.org webserver, you point your browser to localhost:8080 (or whatever else address you have set for the proxy) and tell the proxy to connect to www.qtcentre.org:80.

The application sits in the system tray and is configurable via a context menu.

If you use NetworqDebugger, be sure to check if your firewall allows connections to the port the proxy listens on.

Current features:
- SOCKS5 mode of operation for TCP client-side connections,
- transparent proxy mode of operation for TCP client-side connections,
- configurable listening address,
- configurable default remote address,
- session management (application 'lives' through logouts under X11).

Compilation:
1. ungzip/untar
2. run qmake
3. run (n)make

Feedback is welcome.

saeedIRHA
9th October 2011, 10:59
unfortunately i cannot decompress the file, it says that the archive file is corrupted :(

wysota
9th October 2011, 11:13
The archive is doublegzipped. I ungzipped it once for you.

Fred
19th October 2011, 17:41
Can your proxy handle all browser requests (GET, POST) or it is limited? I would like to test it but it crashes immediately after starting. Qt 4.7.4 Linux.

wysota
19th October 2011, 19:42
It shouldn't care about the request type.

Fred
20th October 2011, 17:14
Do you plan to improve the program so that it can run with Linux?

patrik08
10th December 2011, 06:51
I try to build on Mac osx New Lions 10.7.2 & qt -> qmake -v
QMake version 2.01a
Using Qt version 4.8.0 in /Developer/qt/lib


g++ -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/Developer/qt/mkspecs/macx-g++ -I. -I/Developer/qt/lib/QtCore.framework/Versions/4/Headers -I/Developer/qt/include/QtCore -I/Developer/qt/lib/QtNetwork.framework/Versions/4/Headers -I/Developer/qt/include/QtNetwork -I/Developer/qt/lib/QtGui.framework/Versions/4/Headers -I/Developer/qt/include/QtGui -I/Developer/qt/include -I. -I. -F/Developer/qt/lib -o conversationserver.o conversationserver.cpp
conversationserver.cpp: In member function ‘virtual void ConversationServer::incomingConnection(int)†:
conversationserver.cpp:189: error: cast from ‘const char*’ to ‘quint32’ loses precision
make: *** [conversationserver.o] Error 1

wysota
25th March 2013, 21:49
Please find a working version of the program in the attachment.