EasyProxy.js
Usage
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
pacScript
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
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 |
❌ |
❌ |
❌ |
❌ |