I am wondering whether it is technically possible to create a proxy within a java applet.
And would it then be possible to route all further browser requests through this java applet proxy?
Eg., if the user would browse to google.com, could the default behaviour be replaced by this proxy applet?
Any feedback is appreciated.
Technically is possible, but I think it might be very expensive and time consuming to build. You might need to do something similar as what the Juniper VPN client does. It runs an applet which run an OS specific app that changes the proxy settings, and, in you case, the same applet can run as a proxy server. The OS application also has to revert the proxy settings if it detects that the applet died or was closed. In the case of Juniper, it changes the system hosts file instead of the proxy settings.
As for Mat concern: the user will get a few pop ups telling her to be SUPER sure of running the app and installing the OS app… again, in the same way that happens with Juniper 🙂
EDIT
It depends how many OSs / browsers you want to support. In worst case scenario you’ll need an app to set and rollback the system proxy settings for Windows, Mac, Linux (I don’t even know if there’s system wide configuration for the proxy configuration). Then (as far as I remember) the way to sign an applet for IE is different than for all the other browsers.
What I’m trying to say is that it’s not a weekend job, it could easily take a couple of months to code and have plenty of issues with certain combination of OS / browsers.