xfuture 1.2.7 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -95,10 +95,10 @@ class xFuture {
95
95
  SetGlobalMode(isGlobalMode, ipdir){
96
96
  console.log("isGlobalMode:", isGlobalMode, " dir:", ipdir);
97
97
  ff.SetGlobalMode(isGlobalMode, ipdir);
98
+ parser.isGlobalMode = isGlobalMode;
98
99
  if (isGlobalMode == parser.isGlobalMode) {
99
100
  return;
100
101
  }
101
- parser.isGlobalMode = isGlobalMode;
102
102
  let K_Connected = 2;
103
103
  if (this.GetCurrentStatus() == K_Connected) {
104
104
  var url = this.GetCurrentURI();
@@ -0,0 +1,70 @@
1
+ {
2
+ "remark": "HongKong",
3
+ "log": {
4
+ "loglevel": "info"
5
+ },
6
+ "tun": {
7
+ "inet4_address": "172.19.0.1/30",
8
+ "stack": "system",
9
+ "mtu": 9000,
10
+ "auto_route": true,
11
+ "auto_detect_interface": true,
12
+ "override_android_vpn": false
13
+ },
14
+ "routing":{
15
+ "rules":[
16
+ {
17
+ "type":"field",
18
+ "domain":["geosite:cn"],
19
+ "outboundTag":"direct"
20
+ },
21
+ {
22
+ "type":"field",
23
+ "ip":["geoip:private", "geoip:cn"],
24
+ "outboundTag":"direct"
25
+ },
26
+ {
27
+ "type":"field",
28
+ "domain":["geosite:geolocation-!cn"],
29
+ "outboundTag":"proxy"
30
+ }
31
+ ]
32
+ },
33
+ "outbounds":[
34
+ {
35
+ "protocol": "vmess",
36
+ "tag": "proxy",
37
+ "settings":{
38
+ "vnext":[
39
+ {
40
+ "address":"183.232.170.22",
41
+ "port":30061,
42
+ "users":[
43
+ {
44
+ "encryption":"",
45
+ "security":"auto",
46
+ "alterId":0,
47
+ "id":"54fc2504-f8d1-46f9-9ff5-f419953d02fb",
48
+ "flow":"",
49
+ "level":8
50
+ }
51
+ ]
52
+ }
53
+ ]
54
+ }
55
+ },
56
+ {
57
+ "protocol": "freedom",
58
+ "tag": "direct"
59
+ },
60
+ {
61
+ "settings": {
62
+ "response": {
63
+ "type": "http"
64
+ }
65
+ },
66
+ "protocol": "blackhole",
67
+ "tag": "block"
68
+ }
69
+ ]
70
+ }
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xfuture",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "electron vpn sdk",
5
5
  "main": "x.js",
6
6
  "scripts": {
@@ -30,6 +30,8 @@
30
30
  "package/windows/sysproxy.exe",
31
31
  "package/windows/xFuture.node",
32
32
  "package/windows/xray.dll",
33
+ "package/windows/xray.exe",
34
+ "package/windows/config.json",
33
35
  "resources/geoip.dat",
34
36
  "resources/geosite.dat"
35
37
  ],
@@ -41,6 +43,9 @@
41
43
  "NSMicrophoneUsageDescription": "I need access to your microphone to send your voice to others in the session room.",
42
44
  "NSCameraUsageDescription": "I need access to your camera so that others can see you in the session room."
43
45
  }
46
+ },
47
+ "win":{
48
+ "requestedExecutionLevel": "highestAvailable"
44
49
  }
45
50
  }
46
51
  }
package/parser.js CHANGED
@@ -203,33 +203,41 @@ class xParser {
203
203
  getRules() {
204
204
  var rules = [];
205
205
  if (!this.isGlobalMode) {
206
- var A = {};
207
- A.type = "field";
208
- A.domain = ["geosite:cn"];
209
- A.outboundTag = "direct";
210
- rules.push(A);
211
-
212
- var B = {};
213
- B.type = "field";
214
- B.ip = ["geoip:private", "geoip:cn"];
215
- B.outboundTag = "direct";
216
- rules.push(B);
217
-
218
- var C = {};
219
- C.type = "field";
220
- C.domain = ["geosite:geolocation-!cn"];
221
- C.outboundTag = "proxy";
222
- rules.push(C);
206
+ rules = [
207
+ {
208
+ "type":"field",
209
+ "domain":["geosite:cn"],
210
+ "outboundTag":"direct"
211
+ },
212
+ {
213
+ "type":"field",
214
+ "ip":["geoip:private", "geoip:cn"],
215
+ "outboundTag":"direct"
216
+ },
217
+ {
218
+ "type":"field",
219
+ "domain":["geosite:geolocation-!cn"],
220
+ "outboundTag":"proxy"
221
+ }
222
+ ]
223
223
  }
224
224
  return rules;
225
225
  }
226
226
 
227
227
  getBase(){
228
228
  var base = {
229
- "remark": "Unknown",
229
+ "remark": "MaoDou",
230
230
  "log": {
231
231
  "loglevel": "info"
232
232
  },
233
+ "tun": {
234
+ "inet4_address": "172.19.0.1/30",
235
+ "stack": "system",
236
+ "mtu": 9000,
237
+ "auto_route": true,
238
+ "auto_detect_interface": true,
239
+ "override_android_vpn": false
240
+ },
233
241
  "inbounds": [
234
242
  {
235
243
  "settings": {
@@ -276,7 +284,14 @@ class xParser {
276
284
  "protocol": "blackhole",
277
285
  "tag": "block"
278
286
  }
279
- ]
287
+ ],
288
+ "dns": {
289
+ "hosts": {
290
+ "domain:googleapis.cn": "googleapis.com",
291
+ "dns.google": "8.8.8.8",
292
+ },
293
+ "servers":["8.8.8.8", "8.8.4.4", "1.1.1.1", "1.0.0.1"]
294
+ }
280
295
  }
281
296
  return base;
282
297
  }