sunhux
asked on
Modify a html (used in proxy) to intercept url being loaded to compare if it's in whitelist
Refer to attached html file which I learnt from my secure browsing vendor will be used in the proxy server
(this proxy is being pointed to by our IE & Chrome browsers).
We are supposed to do whitelisting/blacklistg in the proxy but it's currently not working (got various invalid
certs & website insecure errors when going thru proxy) though this html somehow seems to be activated/run.
My plan is just to set the proxy to not have any whitelist/blacklist but instead this html will check against a
txt file for a list of whitelisted sites/URLs & if the URL/IP address that is going to be loaded is in
c:\folder\readonlyfile_whi telist.txt , allow the user to continue to use IE to load it, otherwise, launch/load it
using the secure browser (refer to the line in the browser ie garrison://url_to_be_loade d ie :
<a href="garrison:%U[URL/URI] ">%U[URL/U RI]</a>
I'm probably referring to a similar solution in links below:
https://stackoverflow.com/questions/1686687/how-can-i-get-the-destination-url-for-the-onbeforeunload-event
https://stackoverflow.com/questions/5190021/track-the-new-url-being-entered-in-the-browser
The URLs in the c:\folder\readonlyfile_whi telist.txt may contains wildcards so need the
coding needs to handle this.
Eg: readonlyfile_whitelist.txt contains the following:
*.trusted.com*
*192.168.*
then when the user is loading the following URLs, it will be treated as a whitelisted url
& allow him to continue in IE:
https://www.trusted.com/sub1/page.html
http://192.168.33.55/login.aspx
otherwise, the command garrison://URL will be used, launching the secure browser
& load the URL in the secure browser
scbrw.html
(this proxy is being pointed to by our IE & Chrome browsers).
We are supposed to do whitelisting/blacklistg in the proxy but it's currently not working (got various invalid
certs & website insecure errors when going thru proxy) though this html somehow seems to be activated/run.
My plan is just to set the proxy to not have any whitelist/blacklist but instead this html will check against a
txt file for a list of whitelisted sites/URLs & if the URL/IP address that is going to be loaded is in
c:\folder\readonlyfile_whi
using the secure browser (refer to the line in the browser ie garrison://url_to_be_loade
<a href="garrison:%U[URL/URI]
I'm probably referring to a similar solution in links below:
https://stackoverflow.com/questions/1686687/how-can-i-get-the-destination-url-for-the-onbeforeunload-event
https://stackoverflow.com/questions/5190021/track-the-new-url-being-entered-in-the-browser
The URLs in the c:\folder\readonlyfile_whi
coding needs to handle this.
Eg: readonlyfile_whitelist.txt
*.trusted.com*
*192.168.*
then when the user is loading the following URLs, it will be treated as a whitelisted url
& allow him to continue in IE:
https://www.trusted.com/sub1/page.html
http://192.168.33.55/login.aspx
otherwise, the command garrison://URL will be used, launching the secure browser
& load the URL in the secure browser
scbrw.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
should probably read:
otherwise, the command garrison://URL will be executed, launching
Also,
a) https://www.trusted.com.sg/suburl/page.html will be treated as whitelisted
b) need to customize this html to detect if the whitelisted URL being loaded is
downloading a file (while in IE, not in Secure Browser) & if filetype is not in a
list of banned list (eg: .exe, .pdf, .js), then allow the download to go through,
else block it