Add configuration files for VPN setups and remove empty demo scripts
This commit is contained in:
28
config-sub-converter/scripts/demo/embedded.js
Normal file
28
config-sub-converter/scripts/demo/embedded.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// Example:
|
||||
// Script Operator
|
||||
// 1. backend version(>2.14.88):
|
||||
$server.name = 'prefix-' + $server.name
|
||||
$server.ecn = true
|
||||
$server['test-url'] = 'http://1.0.0.1/generate_204'
|
||||
// 2. operator function
|
||||
function operator(proxies, targetPlatform, context) {
|
||||
return proxies.map( proxy => {
|
||||
// Change proxy information here
|
||||
|
||||
return proxy;
|
||||
});
|
||||
}
|
||||
|
||||
// Script Filter
|
||||
// 1. backend version(>2.14.119):
|
||||
const port = Number($server.port)
|
||||
return [80].includes(port)
|
||||
|
||||
// 2. filter function
|
||||
function filter(proxies, targetPlatform) {
|
||||
return proxies.map( proxy => {
|
||||
// Return true if the current proxy is selected
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user