Results 1 to 6 of 6

Thread: Is this possible with QT or CPP: Routing Encapsulation / IP Encapsulation?

  1. #1
    Join Date
    Feb 2011
    Posts
    25
    Qt products
    Qt4
    Platforms
    Windows

    Question Is this possible with QT or CPP: Routing Encapsulation / IP Encapsulation?

    Dear QT Developers,

    VS-DRouting.jpg
    *image from: http://www.linuxvirtualserver.org/VS-DRouting.html

    In simple language:
    I would like to make a program that redirects users to a EXTERNAL server, change the request slightly and most important encapsulate the IP from the user. Therefore the respondse from the external server will go straight to the user, else it has to go to my server again and so causing extra unneeded bandwith. These servers are not in the same network.

    Is such thing possible?

  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: Is this possible with QT or CPP: Routing Encapsulation / IP Encapsulation?

    "It depends". In user space, yes, in kernel space, that's rather outside of Qt's scope.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Feb 2010
    Posts
    96
    Thanks
    4
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Is this possible with QT or CPP: Routing Encapsulation / IP Encapsulation?

    Quote Originally Posted by janton View Post
    ...and most important encapsulate the IP from the user.
    Curious, is there a reason for this part? A sniffer would be able to see the service's IP when it responds straight to the user.

    edit: Sorry, may I don't understand what you mean by 'encapsulate'.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Is this possible with QT or CPP: Routing Encapsulation / IP Encapsulation?

    The linked article is talking about the director machine kernel modifying MAC address in Ethernet frames and transmitting them on the LAN to the 'real' server. This is not something that Qt is built for.

    AFAICT the returning packets, while emitted by the 'real' server will contain a source IP address of the director's public interface courtesy of a couple of interface and routing table tricks.

    At a higher level you may be able to do something like onion routing and hidden services (lookup Tor) to make client and server unaware of each other. This would come with substantial overhead.

  5. #5
    Join Date
    Feb 2011
    Posts
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Is this possible with QT or CPP: Routing Encapsulation / IP Encapsulation?

    Sorry perhaps my question wasn't that clear, so I took my pen and draw it (there is nothing better then a clear picture)
    I get back on your questions soon, the problem is... perhaps i did not explain as well as i hoped. See image below:

    The circle starts with the user that sends a request to the server etc.
    is_this_possible.jpg

    I don't want to make changes to the kernel, i want to write a linux program that redirects a users request to a external server that then send the responds back to the user.

  6. #6
    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: Is this possible with QT or CPP: Routing Encapsulation / IP Encapsulation?

    So what you want to do is a sort of network proxy. Yes, it is possible to do it with Qt with the only exception that the new request will not carry the user IP. And I don't think any networking stack will allow a user application to forge a packet with a fake IP address. Which sums up to the fact, that the reply will go back to the proxy and then can be forwarded back to the client.

    However the question that comes to my mind is why you want to do it using Qt, I don't see any benefits of that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. IP Routing QTcpSocket
    By naturalpsychic in forum Qt Programming
    Replies: 8
    Last Post: 1st April 2012, 06:47
  2. How to change mouse event routing?
    By kathy in forum Qwt
    Replies: 0
    Last Post: 7th June 2011, 16:06
  3. how to change mouse message routing?
    By kathy in forum Qt Quick
    Replies: 0
    Last Post: 24th May 2011, 21:59
  4. Routing stdout to Plain Text Edit
    By Barry79 in forum Qt Programming
    Replies: 7
    Last Post: 2nd April 2009, 13:06
  5. Somewhat OT, line routing for diagramming tool
    By pherthyl in forum Qt Programming
    Replies: 7
    Last Post: 20th October 2008, 19:23

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.