Insecure HTTPS Proxy
Proxies HTTPS requests without validating the SSL Certificate.
My source:
async function fetch(request, env, ctx) {
const url = new URL(request.url);
const newURL = url.searchParams.get("url")
console.log(newURL)
if (!newURL?.length) {
return new Response(
`<h1>Insecure HTTPS Proxy</h1>
<div>Proxies HTTPS requests without validating the SSL Certificate.</div>
<br>
<div>Example usage - <a href="${exampleURL}">${exampleURL}</a></div>
<h1>My source:</h1>
<pre>${escape(this.fetch.toString().replaceAll(" ", " "))}</pre>
`
, {
headers: {
"content-type": "text/html"
}
})
}
try {
const newReq = new Request(newURL, request)
const resp = await globalThis.fetch(newReq)
return resp
} catch (e) {
return Response.json({ message: e.message, stack: e.stack})
}
}