Skip to content

jc3213/easyproxy.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EasyProxy.js

Usage

Lastest Extension
easyproxy.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

let profile = new EasyProxy('HTTP 127.0.0.1:1080');
let profile = new EasyProxy();
profile.proxy = 'SOCKS 127.0.0.1:1080';

Properties

data

  • array
  • read only
let { data } = profile;

pacScript

  • string
  • read only
let { pacScript } = profile;

Method

new

profile.new(string | string[]);
profile.new(); // Clear all rules

add

profile.add(string | string[]);

delete

profile.delete(string | string[]);

test

let result = profile.test(string);

Static Properties

pacScript

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

Static Method

test

let result = EasyProxy.test(string);

make

let rule = EasyProxy.make(string);

delete

EasyProxy.delete(string | string[]);

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