fogact 1.1.6 → 1.1.8

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.
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ const packageJson = require("../../package.json");
3
4
  const https = require("https");
4
5
  const http = require("http");
5
6
 
6
7
  // 支持环境变量配置 API 地址
7
- const API_BASE = process.env.CLIPROXY_API_BASE || "http://localhost:34020";
8
+ const API_BASE = process.env.FOGACT_API_BASE || "http://localhost:34020";
8
9
 
9
10
  function makeRequest(path, options = {}) {
10
11
  return new Promise((resolve, reject) => {
@@ -19,7 +20,7 @@ function makeRequest(path, options = {}) {
19
20
  method: options.method || "GET",
20
21
  headers: {
21
22
  "Content-Type": "application/json",
22
- "User-Agent": "fogact/1.1.6",
23
+ "User-Agent": `fogact/${packageJson.version}`,
23
24
  ...options.headers,
24
25
  },
25
26
  };
@@ -127,13 +128,13 @@ async function getNodes(service) {
127
128
 
128
129
  // 返回默认节点
129
130
  return [
130
- { name: "Default Node", url: "https://yunyi.cfd", region: "Global" }
131
+ { name: "FogAct Local Node", url: "http://localhost:34020", region: "Global" }
131
132
  ];
132
133
  } catch (err) {
133
134
  console.error("Failed to fetch nodes:", err.message);
134
135
  // 返回默认节点
135
136
  return [
136
- { name: "Default Node", url: "https://yunyi.cfd", region: "Global" }
137
+ { name: "FogAct Local Node", url: "http://localhost:34020", region: "Global" }
137
138
  ];
138
139
  }
139
140
  }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ const packageJson = require("../../package.json");
3
4
  const http = require("http");
4
5
  const https = require("https");
5
6
 
@@ -58,7 +59,7 @@ async function verifyNewApiKey(config, apiKey) {
58
59
  headers: {
59
60
  Authorization: `Bearer ${apiKey}`,
60
61
  Accept: "application/json",
61
- "User-Agent": "fogact/1.1.6",
62
+ "User-Agent": `fogact/${packageJson.version}`,
62
63
  },
63
64
  });
64
65
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- const { testNode } = require("./cliproxy-api");
3
+ const { testNode } = require("./fogact-api");
4
4
 
5
5
  async function testNodes(nodes) {
6
6
  const results = [];
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "fogact",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "FogAct activation helper for Claude Code and Codex",
5
5
  "keywords": [
6
6
  "fogact",
7
- "cliproxy",
8
- "fogidc",
9
7
  "claude",
10
8
  "codex",
11
- "cli-proxy-api",
12
9
  "activator"
13
10
  ],
14
11
  "license": "MIT",
@@ -18,11 +15,7 @@
18
15
  },
19
16
  "bin": {
20
17
  "fogact": "bin/cli.js",
21
- "fogact-web": "bin/web-server.js",
22
- "cliproxy-activator": "bin/cli.js",
23
- "cliproxy-web": "bin/web-server.js",
24
- "fogidc-activator": "bin/cli.js",
25
- "fogidc-web": "bin/web-server.js"
18
+ "fogact-web": "bin/web-server.js"
26
19
  },
27
20
  "main": "./lib/index.js",
28
21
  "files": [