Skip to content

aalfiann/nrproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NRProxy

Version Build Status js-semistandard-style License
NRProxy means No Reverse Proxy (for browser only).

How this work

This library is worked as client-side in the browser, to protect your website from unkown web proxies out there. The rejected web proxies will be turn into your backlink and redirect the visitor to your original website automatically.

Install using NPM

$ npm install nrproxy

// then use with path
<script src="node_modules/nrproxy/dist/nrproxy.js"></script>

Or simply use with CDN

<!-- Always get the latest version -->
<!-- Not recommended for production sites! -->
<script src="https://cdn.jsdelivr.net/npm/nrproxy/dist/nrproxy.js"></script>

<!-- Get minor updates and patch fixes within a major version -->
<script src="https://cdn.jsdelivr.net/npm/nrproxy@1/dist/nrproxy.js"></script>

<!-- Get patch fixes within a minor version -->
<script src="https://cdn.jsdelivr.net/npm/nrproxy@1.0/dist/nrproxy.js"></script>

<!-- Get a specific version -->
<!-- Recommended for production sites! -->
<script src="https://cdn.jsdelivr.net/npm/nrproxy@1.0.7/dist/nrproxy.js"></script>

Usage

NRProxy('yourdomain.com');

If you have your own web proxy and want to allow it

NRProxy('yourdomain.com, domain2.com, domain3.com');

Note:

  • If you allow many domains, then the rejected proxy will always redirected to the first array of domain.
  • Please use file nrproxy.js from dist directory, because web proxies out there is very smart, we just need to obfuscated it.

Example

<html>
    <head></head>
    <body>
        <H1>NRProxy Example</H1>
        <script src="https://cdn.jsdelivr.net/npm/nrproxy/dist/nrproxy.js"></script>
        <script>
            NRProxy('yourdomain.com, localhost:1313');
        </script>
    </body>
</html>

About

NRProxy means No Reverse Proxy

Resources

License

Stars

Watchers

Forks

Packages

No packages published