xfuture 1.5.3 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- package/config.js +38 -38
- package/index.js +3 -3
- package/package.json +1 -1
- package/parser.js +1 -1
package/config.js
CHANGED
@@ -207,7 +207,7 @@ function get_external_rules(){
|
|
207
207
|
}
|
208
208
|
else {
|
209
209
|
if (element.method == "block") {
|
210
|
-
ips_block.push(element.content
|
210
|
+
ips_block.push(element.content);
|
211
211
|
}
|
212
212
|
else if (element.method == "direct") {
|
213
213
|
ips_direct.push(element.content);
|
@@ -216,48 +216,48 @@ function get_external_rules(){
|
|
216
216
|
ips_proxy.push(element.content);
|
217
217
|
}
|
218
218
|
}
|
219
|
+
}
|
219
220
|
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
221
|
+
if (ips_block.length > 0) {
|
222
|
+
var x = {};
|
223
|
+
x.outbound = "block";
|
224
|
+
x.ip_cidr = ips_block;
|
225
|
+
rules.push(x);
|
226
|
+
}
|
226
227
|
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
228
|
+
if (ips_direct.length > 0) {
|
229
|
+
var x = {};
|
230
|
+
x.outbound = "direct";
|
231
|
+
x.ip_cidr = ips_direct;
|
232
|
+
rules.push(x);
|
233
|
+
}
|
233
234
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
235
|
+
if (ips_proxy.length > 0) {
|
236
|
+
var x = {};
|
237
|
+
x.outbound = "proxy";
|
238
|
+
x.ip_cidr = ips_proxy;
|
239
|
+
rules.push(x);
|
240
|
+
}
|
240
241
|
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
242
|
+
if (domains_block.length > 0) {
|
243
|
+
var x = {};
|
244
|
+
x.outbound = "block";
|
245
|
+
x.domain = domains_block;
|
246
|
+
rules.push(x);
|
247
|
+
}
|
247
248
|
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
249
|
+
if (domains_direct.length > 0) {
|
250
|
+
var x = {};
|
251
|
+
x.outbound = "direct";
|
252
|
+
x.domain = domains_direct;
|
253
|
+
rules.push(x);
|
254
|
+
}
|
254
255
|
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
}
|
256
|
+
if (domains_proxy.length > 0) {
|
257
|
+
var x = {};
|
258
|
+
x.outbound = "proxy";
|
259
|
+
x.domain = domains_proxy;
|
260
|
+
rules.push(x);
|
261
261
|
}
|
262
262
|
return rules;
|
263
263
|
}
|
@@ -420,7 +420,7 @@ xConfig.inbounds = [
|
|
420
420
|
xConfig.ai = function(address){
|
421
421
|
var x = {
|
422
422
|
"log": {
|
423
|
-
"level": "
|
423
|
+
"level": "error",
|
424
424
|
"timestamp": true
|
425
425
|
},
|
426
426
|
"dns": xConfig.dns,
|
package/index.js
CHANGED
@@ -36,7 +36,7 @@ class xFuture {
|
|
36
36
|
if(this.driver.length == 0) return false;
|
37
37
|
var xray_json = JSON.stringify(parser.parse(url));
|
38
38
|
var sing_json = JSON.stringify(parser.getSingBox(url));
|
39
|
-
console.log("json:", xray_json, "
|
39
|
+
// console.log("json:", xray_json, "====================>sing_json:", sing_json);
|
40
40
|
var ok = ff.StartTunnel(xray_json, url, sing_json);
|
41
41
|
if (ok) {
|
42
42
|
ok = this.StartProxy();
|
@@ -86,7 +86,7 @@ class xFuture {
|
|
86
86
|
|
87
87
|
var xray_json = JSON.stringify(parser.parse(url));
|
88
88
|
var sing_json = JSON.stringify(parser.getSingBox(url));
|
89
|
-
console.log("ChangeURL: ", xray_json, " sing-box:", sing_json);
|
89
|
+
// console.log("ChangeURL: ", xray_json, " sing-box:", sing_json);
|
90
90
|
return ff.ChangeURL(xray_json, url, false, sing_json);
|
91
91
|
}
|
92
92
|
|
@@ -104,7 +104,7 @@ class xFuture {
|
|
104
104
|
var xray_json = JSON.stringify(parser.parse(url));
|
105
105
|
var sing_json = JSON.stringify(parser.getSingBox(url));
|
106
106
|
ff.ChangeURL(xray_json, url, true, sing_json);
|
107
|
-
console.log("Change URL:", url, " force:", true, " xray_json:", xray_json, " sing-box:", sing_json);
|
107
|
+
// console.log("Change URL:", url, " force:", true, " xray_json:", xray_json, " sing-box:", sing_json);
|
108
108
|
}
|
109
109
|
}
|
110
110
|
|
package/package.json
CHANGED