block-proxy 0.1.0 → 0.1.1

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/config.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "network_scanning_status": "1",
2
+ "network_scanning_status": "0",
3
3
  "progress_time_stamp": "1766571511705",
4
4
  "block_hosts": [
5
5
  {
@@ -133,7 +133,7 @@
133
133
  ],
134
134
  "proxy_port": 8001,
135
135
  "web_interface_port": 8003,
136
- "your_domain": "abc.com",
136
+ "your_domain": "yui.cool",
137
137
  "vpn_proxy": "",
138
138
  "auth_username": "",
139
139
  "auth_password": "",
@@ -144,7 +144,7 @@
144
144
  "devices": [
145
145
  {
146
146
  "ip": "192.168.124.1",
147
- "mac": "66:65:A3:5A:D7:8C"
147
+ "mac": "FA:27:3C:E5:31:5F"
148
148
  },
149
149
  {
150
150
  "ip": "192.168.124.2",
@@ -224,11 +224,27 @@
224
224
  },
225
225
  {
226
226
  "ip": "192.168.124.10",
227
- "mac": "66:65:A3:5A:D7:8C"
227
+ "mac": "FA:27:3C:E5:31:5F"
228
228
  },
229
229
  {
230
230
  "ip": "192.168.124.150",
231
231
  "mac": "14:C0:50:14:6E:A5"
232
+ },
233
+ {
234
+ "ip": "192.168.124.21",
235
+ "mac": "DC:97:58:D:FD:9F"
236
+ },
237
+ {
238
+ "ip": "192.168.124.96",
239
+ "mac": "EE:98:74:21:D2:73"
240
+ },
241
+ {
242
+ "ip": "192.168.124.107",
243
+ "mac": "6:26:EA:5A:9E:6C"
244
+ },
245
+ {
246
+ "ip": "192.168.124.128",
247
+ "mac": "48:F3:F3:CA:1D:E"
232
248
  }
233
249
  ]
234
250
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "block-proxy",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Small-scale network proxy filter",
5
5
  "bin":{
6
6
  "block-proxy": "./bin/start.js"
package/proxy/fs.js CHANGED
@@ -11,7 +11,8 @@ async function writeConfig(newData) {
11
11
  try {
12
12
  // 使用 write-file-atomic 进行原子写入
13
13
  // 它会在内部创建一个临时文件,写入成功后再重命名为目标文件
14
- await writeFileAtomic(CONFIG_FILE_PATH, JSON.stringify(newData, null, 2), 'utf8');
14
+ // await writeFileAtomic(CONFIG_FILE_PATH, JSON.stringify(newData, null, 2), 'utf8');
15
+ await fs.writeFile(CONFIG_FILE_PATH, JSON.stringify(newData, null, 2), 'utf8');
15
16
  // console.log('Config file written successfully');
16
17
  } catch (error) {
17
18
  console.error('Error writing config file:', error.message);