From 6aefa6632023c99c5b91bae0e099df94fa69d890 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 17 May 2011 04:18:13 +0000 Subject: GatsCon now supports proxying, and way better than qtbenc ever did. Not only does it proxy, but you can inject your own messages going to the client or host. Pretty slick, really. Next up, reading and creating files. --- src/gatscon/mainwnd.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'src/gatscon/mainwnd.cpp') diff --git a/src/gatscon/mainwnd.cpp b/src/gatscon/mainwnd.cpp index c86e1c2..f20a531 100644 --- a/src/gatscon/mainwnd.cpp +++ b/src/gatscon/mainwnd.cpp @@ -1,5 +1,10 @@ #include "mainwnd.h" + #include "clientwidget.h" +#include "proxywidget.h" + +#include "connectdlg.h" +#include "setupproxydlg.h" MainWnd::MainWnd() { @@ -12,11 +17,29 @@ MainWnd::~MainWnd() void MainWnd::connect() { - setCentralWidget( new ClientWidget( this ) ); + ConnectDlg dlg( this ); + if( dlg.exec() == QDialog::Accepted ) + { + setCentralWidget( + new ClientWidget( + this, dlg.getHostname(), dlg.getPort() + ) + ); + } } void MainWnd::proxy() { + SetupProxyDlg dlg( this ); + + if( dlg.exec() == QDialog::Accepted ) + { + setCentralWidget( + new ProxyWidget( + this, dlg.getPortIn(), dlg.getHostOut(), dlg.getPortOut() + ) + ); + } } void MainWnd::open() -- cgit v1.2.3