I'm currently working with a proxy, and have run into the issue that images are not proxied, so my solution is to rewrite the various URLs and src attributes to be passed through my proxy. However, I've run into an issue where after running them through my proxy, the image is displayed, instead of processed in a way where the image can be then ripped by an <img> or <script> tag src.
function edit(){
var proxy_url = "----insert proxy query here----";
var srcNodeList = document.querySelectorAll('[src],[href]');
console.log(srcNodeList)
for (var i = 0; i < srcNodeList.length; ++i) {
console.log("Prior: " + srcNodeList[i].src + " | " + srcNodeList[i].href)
if(srcNodeList[i].src){
srcNodeList[i].src = proxy_url + srcNodeList[i].src;
}
if(srcNodeList[i].href){
srcNodeList[i].href = proxy_url + srcNodeList[i].href;
}
console.log(" Modded: " + srcNodeList[i].src + " | " + srcNodeList[i].href+"\n")
}
}
edit()
The issue lies where after passing the image through the proxy, such as https://proxynamehere.com?url=imagedirectorylink.com/img.img that it's only displayed, so using it then as a src provides no image.