Can you explain incoming html a bit more.
HTML requested by a user from inside your local network?
HTML that was posted to a server inside your network?
Hi folks,
I'm working on a project where I need the router to modify incoming html. It's for an artwork, so the solution does not need to be particularly elegant or efficient. I've considered using a proxy server, but I'd really like to keep the functionality in the router.
I've downloaded and compiled the Tomato source and have been browsing through the code. The problem I'm having is figuring out where to put in my modification. The source isn't very well documented, I'm not particularly well-versed in network programming, and I feel like I'm trying to find a needle in a haystack.
Currently I'm thinking that webio.c is the file I need to muck with. It has some code in which it identifies and writes out HTML. However, I'm wondering if this code isn't run on data passing through the router--perhaps it's just part of the webserver that the router uses to display the admin web pages.
My other thought is that perhaps firewall.c is where I want to be working... but I don't see any obvious place in that file to do what I need to do.
Once my router arrives, these are the areas where I'm going to experiment... Not really sure how I'm going to debug this--I guess having info written out to log file is the only way to have an idea of what is going on.
Thanks for any suggestions!
When someone connects to a webpage using the wireless router, I'm looking to intercept the incoming html and modify it slightly before allowing it to continue on to the user.
By the way, it occurred to me that it might be possible to set this up using a firewall or startup script, but frankly I have much more experience working in C/C++ than I do writing Linux scripts, so my inclination is to do something directly in the firmware.
OK, here are my thoughts.
Firewall approach:
-can be done using http://linux.die.net/man/3/libipq
-involves a lot of work, filtering http requests, parsing payload data modify it, change packet checksums
Proxy approach:
-there are several proxy application available for dd-wrt and tomato, see openwrt package list
-concentrate only on modifying packages that were fetched by the proxy
-you have to make sure only proxy can request pages not the clients otherwise they can bypass the proxy

RSS

