Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

nirror/web-proxy

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A web proxy for rewriting web responses on the fly. Based on node-unblocker.

Example

Inject a javascript tag at the end of the page.

var niScriptTag = [
    '<script type="text/javascript">',
    "(function(i,s,o,g,r,a,m){i['NirrorObject']=r;i[r]=i[r]||function(){",
    "(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();i[r].scriptURL=g;a=s.createElement(o),",
    "m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)",
    "})(window,document,'script','https://static.nirror.com/client/nirrorclient.js','Ni');",
    '</script>'
].join("\n");

require("web-proxy")({
	processChunk: function(html) {
		return html.replace("</body>", niScriptTag + "\n</body>");
	}
});

License

This project is released under the terms of the GNU GPL version 3

About

Web proxy for rewriting http responses on the fly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.