This project is read-only.

Routing Internet traffic over specific network interfaces

Nov 11, 2013 at 1: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!
Nov 12, 2013 at 1:25 PM

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 3: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 ?
Nov 15, 2013 at 9:50 PM

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:

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