TcpTraceI got fed up with installing Java & Apache SOAP just to get tcpTunnelGUI, so here's a native Win32 version, built using Attila (no MFC :) ). It started out as a copy of the Apache tool, but has taken on a life of its own!.
Huh, it does what ?Basically you use it as a tunnel between your client & server. Start tcptrace.exe and up comes a dialog box asking for local port #, destination server, and destination port # (Ignore the logging options for now) Fill these in, click Ok, and wow are you going to have fun. For example if you are writing a client and testing against a remote server (say www.razorsoft.net ), you can setup
Local Port # 8080 Destination Server www.razorsoft.net Destination Port # 80Now configure your client so that it thinks the server is at localhost:8080. tcpTrace will forward all the traffic from localport:8080 to the remote server (and vica versa), dumping the contents in the process. If you are hosting a server say on port 80 and want to use it, then change your server to run on port 81, and setup
Local Port # 80 Destination Server localhost Destination Port # 81you can now see your incoming traffic.
It should work with all the text based IP protocols, I've been using it with SOAP (port 80) & HTTP (port 80), and I know Peter Drayton has been using it with POP3 (port 110) & SMTP (port 25)
Command Line OptionsIf you prefer to set-up a tcpTrace session via a command line rather than via the GUI, then there are the following command line options
- /listen <port> : specifies the local port to listen on.
- /serverPort <port> : specifies the destination port to forward traffic to.
- /serverName <servername> : specifies the destination server to forward traffic to.
- /log <log filename> : enables logging to the specified file.
- /logFormat <xml | plain> : specifies the logfile format (when logging is enabled) use xml or plain (plain is default).
- /title <window title> : this overrides the default tcpTrace window title, is useful if you regularly run multiple instances of tcpTrace.
- /kill : stops all running instances of tcpTrace and exits. this can be useful for batch based testing.
tcptrace /listen 8080 /serverPort 80 /serverName services2.xmethods.net tcptrace /listen 8081 /serverPort 80 /serverName soap.4s4c.com /log c:\log.xml /logFormat xml tcptrace /listen 5049 /serverPort 5049 /serverName nagoya.apache.org /title "Apache Server"
If you're doing pure SOAP/HTTP work, you'll want to take a look at proxyTrace as well.
download a copy and give it a go.
My thanks to the following people for helping out
- Peter Drayton for badgering me into writing the logging support.
- Matt Humphrey for spotting and fixing a problem with large payloads and the socket shutdown sequence.
- Steve Witham for fixing my terrible docs, any errors are of course still mine.
- Everyone who made suggestions for new features.
v0.8.1 (Build 717) May 28, 2005
- Can now enter upto 500 characters for the server name.
v0.8.0 (Build 712) December 17, 2003
- If it can't listen on the specified local port it reports an error instead of silently failing.
v0.7.3 (Build 710) December 28, 2002
- Trace settings are now reflected in the window title when /title hasn't been used. Thanks to Tomas Restrepo for the suggestion.
v0.7.2 (Build 708) December 28, 2002
- Added option to fix-up single \r & \n into windows linefeeds so that the display stays formated when tracing against non-windows applications. Thanks to Eric Promislow for the suggestion.
v0.7.1 (Build 683) December 18, 2002
- Added "Show Nulls" option, so that data past a NULL character can be seen.
v0.7.0 (Build 669) July 6, 2002
- Can now select separate fonts for the list view and the text windows.
- word wrap setting now remembered across invocations.
- bug with word wrap toggle loosing font setting fixed.
v0.6.0 (Build 648) March 27, 2002 [aka the Conference Presenters Edition!]
- Font selection is now remembered across invocations.
- The /title command line option added to override the standard window title, useful if you have lots of instances running at the same time.
- Connections that were still active when the trace is stopped, now have their data flushed to the log file.
- A problem with line endings in the XML log was fixed.
v0.5.0 (Build 626) September 2, 2001
- Added support for changing the display font.
- Fixed the problems with clear.
- The payload views for the active connection are now dynamically updated.
v0.4.0 (Build 521) February 21, 2001
- Added support to log the trace info to a file either in plain text or XML format.
- Added support for starting / stopping / logging from the command line (via Chris Sells's excellent command line parser).
- Added a stop trace feature
v0.3.0 (Build 234) January 15, 2001
- Matt Humphrey fixed a problem with large payloads getting truncated / dropped bytes
- Matt Humphrey fixed a problem with the socket shutdown sequence
- Matt Humphrey added support for the up and down cursor keys to work on the connection list
- Added word wrap support for the request / response windows
v0.2.1 (Build 122) December 1, 2000
- Corrected the tab order on the trace settings dialog
v0.2.0 (Build 120) September 30, 2000
- The last used Trace settings are now remembered for next time
- Trace dialog box initially pops up
- Legal gunk added to about dialog box
- Updated docs with additions from Steve Witham
- Added copy of these docs to the download
v0.1.0 (Build 92) September 12, 2000
- Initial Release