Answer the question
In order to leave comments, you need to log in
Changing the html code passing through the proxy server
Greetings Khabrovites.
I need to change the html code for all http traffic, namely. Paste JavaScript link.
What is it for? There is a hotel and there is Wifi in it, I need to display a type of menu so that I can order the service.
How I see it
Wifi Client <-> Access point <-> Router <-> (redirect to transparent proxy with code replacement) -> Internet.
There is no question about the quality of layout and adaptation to different devices, as there are programmers who will deal with this. I'm wondering how you can change the html code?
Answer the question
In order to leave comments, you need to log in
And it would be nice if the entire Internet switched to https in general, so that such perversions would die a natural death.
Today you want to cram a menu with your services, tomorrow you want to replace all advertising banners / adwords with your partners, the day after tomorrow you will edit the Yandex output for a query, for example, “prostitutes near hotel N”, “restaurant in district N”, or whatever you need in hotel.
I'm not saying that if some page loads part of the content from the server via ajax, then your insertion can easily break the behavior of the site.
Excuse me, but what is the difficulty? Recognize that this is html, or what?
We look at the content type, and then with any html parser we shove our script to the end of the body
It can be even easier ... before inserting your script and that's it
a person visits any site as an example /http://habrahabr.ru/ and is added to the end of all pages in
squid, I did not find such parameters, but squid only works with headers.
if you use nginx, then there is an opportunity, but please poke your nose
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question