Routing Internet traffic over specific network interfaces

Nov 11, 2013 at 12:24 PM
What i want to achieve is, I want to route my internet traffic over, all my available connections(like LAN and Data card(3G)), based on conditions like , if a website is blocked over LAN, that traffic goes through Data Card(or other available internet connection).

Can we achieve this using eEx Network Library ?

If yes, any pointers as to how to go about implementing this thing will he highly helpful. Thanks in advance!
Coordinator
Nov 12, 2013 at 12:25 PM
Hello,

It depends.

If you want the re-route ALL the traffic of the computer you are running your program at, it is probably sufficient to simply change the routing table.

If you want to make custom routing decisions for each application or connection, it gets pretty hard.
The basic problem with the Network Library is, that you can not intercept traffic of the host the software is running at (however, you can moitor it).

Could you expand on how the connections are blocked and for what applications are interesing for you (E-Mail/HTTP/etc)?
Maybe we can find a solution.
Nov 12, 2013 at 2:28 PM
I am creating a data access switching web browser,
what it is intended to do is ,
lets say i have 2 available internet connections (LAN and Data Card 3G)
initially all the request of my web browser will go through LAN (by default), and when it gets a blocked signal (website blocked over LAN for access) ,
then it checks the other available connections and routes the traffic of that blocked website through Data Card 3G.

This is the scenario, can the network library help me with this ? or even a modification of it ?
Coordinator
Nov 15, 2013 at 8:50 PM
Hi,

I think this is most easily done at application level (in your web browser appplication).

You can detect whether something blocked your web request and then use the winsock API to bind your socket to another interface (see here: http://stackoverflow.com/questions/2065495/using-a-specific-network-interface-for-a-socket-in-windows).

This way, no low-level features (like those provided by eEx Network Library) are required.