Skip to content

jc3213/easyproxy.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyProxy.js

Usage

Lastest Minified Extension
easyproxy.js easyproxy.min.js Easy Proxy

HTML

<script src="https://jc3213.github.io/easyproxy.js/easyproxy.js"></script>

TamperMonkey

// @require https://jc3213.github.io/easyproxy.js/easyproxy.js

Syntax

const router = new EasyProxy();

Properties

routing

  • object
  • read only
const { routing } = router;

pacScript

  • string
  • read only
const { pacScript } = router;

Method

getScript

router.getScript(proxy | string"");

addProxy

router.addProxy(proxy | string"", rule | Array[] | null);

removeProxy

router.removeProxy(proxy | string"");

hasProxy

const result = router.hasProxy(proxy | string"");

listProxies

const proxies = router.listProxies();

findProxy

const result = router.findProxy(hostname | location.hostname | new URL().hostname | string"");

addRule

router.addRule(proxy | string"", rule | string"");

removeRule

router.removeRule(proxy | string"", rule | string"");

hasRule

const result = router.hasRule(rule | string"");

getRules

const rules = router.getRules(proxy | string"");
const object = router.getRules();

purgeRules

router.purgeRules();

getScript

const pasScript = router.getScript(proxy | string"");

destroy

router.destroy();

Static Properties

pacScript

  • string
  • read only
const { pacScript } = EasyProxy;

Static Method

make

const rule = EasyProxy.make(hostname | location.hostname | new URL().hostname | string"");

getScript

const pacScript = EasyProxy.getScript(Array[ router | instance ]);

MatchPattern

  • example.com
    • Matches www.example.com, example.com
    • Exclude test-example.com, www.example.com.cn
Match Pattern ↓ www.youtube.com www.facebook.net x.com telegram.org
*
youtube.com
facebook.com
x.com
com
org
youtube
telegram

About

A JavaScript library built on top of MatchPattern.js, aiming to simplify proxy routing and enhance user experience.

Topics

Resources

License

Stars

Watchers

Forks

Contributors