Results 1 to 4 of 4

Thread: tunneling in Qt

  1. #1
    Join Date
    May 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default tunneling in Qt

    I want to make something like that: I will run server for WWW on port 80. I want my program in QT to "catch" port 80, and trasport everything from/to port 80 to/from port 2000. is this possible in Qt4?
    I don't know if I described this well.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: tunneling in Qt

    It's possible, but all packets will have ip of the "proxy" (your Qt application).

  3. #3
    Join Date
    May 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: tunneling in Qt

    Ok. I may live with that. So, how can I make this?

  4. #4
    Join Date
    Feb 2007
    Posts
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Lightbulb Re: tunneling in Qt

    I'm a firm believer that Qt is up to darned near any task. With that said I also think the right tool for the right job. Check out the program proxy @

    http://sourceforge.net/projects/proxy/

    If you are still interested in using Qt, here's a hint on where what would have to be done.

    Stat with a QCoreApplication, have it create a QTcpServer, set this up to listen on port 80.

    When a connection comes in, create a QTcpSocket and have it connect to the port you want to move the traffic too.

    Then just connect signals and slots so the traffic get funneled between the two.

    My explaination is very simplistic and may be full of holes that you would have to fill in, things like subclassing the socket objects to make the traffic flow, maybe making it threaded. Possibly other things too. If I got any more detailed than I did, I would write it, and you probably don't want that.

    -joe

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.