@koishi-ce/plugin-proxy-agent 1.0.0 → 1.0.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/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # @koishi-ce/plugin-proxy-agent
2
+
3
+ **简体中文** | [English](#english)
4
+
5
+ Koishi 的请求代理支持,为全部 `ctx.http` 请求提供统一的代理默认值。本包是 [@cordisjs/plugin-proxy-agent](https://github.com/cordiverse/http) 在 `@koishi-ce` 名下的再分发存根:内联再导出上游包的全部导出,peer 指向 `@koishi-ce/koishi`。它是预编译产物包——无 `src/` 目录、不走根 tsdown 构建(根配置显式 exclude),发布内容即 `index.mjs` 与 `index.d.ts`;上游目录名为 `proxy-agent`,本仓按装载语义改名 `proxy`。
6
+
7
+ ## 配置项
8
+
9
+ | 字段 | 类型 | 默认值 | 说明 |
10
+ | --- | --- | --- | --- |
11
+ | `proxyAgent` | string | - | 默认代理服务器地址(http / https / socks),所有未单独指定代理的请求经此转发 |
12
+
13
+ ## 用法
14
+
15
+ ```bash
16
+ bun add @koishi-ce/plugin-proxy-agent
17
+ ```
18
+
19
+ ```yaml
20
+ plugins:
21
+ proxy-agent:
22
+ proxyAgent: "http://127.0.0.1:7890"
23
+ ```
24
+
25
+ 启用后 `ctx.http` 的请求默认走配置的代理;单次请求仍可通过 `proxyAgent` 选项覆盖(包括传空串禁用)。
26
+
27
+ ## 许可证
28
+
29
+ [MIT](https://github.com/Koishi-CE/koishi/blob/main/LICENSE)。本包内联再导出 MIT 许可的上游 @cordisjs/plugin-proxy-agent,版权归属见 [NOTICE](https://github.com/Koishi-CE/koishi/blob/main/NOTICE)。
30
+
31
+ ---
32
+
33
+ ## English
34
+
35
+ Proxy agent support for Koishi, providing a unified proxy default for all `ctx.http` requests. This package is a redistribution stub of [@cordisjs/plugin-proxy-agent](https://github.com/cordiverse/http) under the `@koishi-ce` scope: it re-exports the upstream package in full, with a peer on `@koishi-ce/koishi`. It is a prebuilt artifact package — no `src/` directory, excluded from the root tsdown build — whose published content is just `index.mjs` and `index.d.ts`; the upstream directory is named `proxy-agent`, renamed to `proxy` in this repository to match its loading semantics.
36
+
37
+ ## Configuration
38
+
39
+ | Field | Type | Default | Description |
40
+ | --- | --- | --- | --- |
41
+ | `proxyAgent` | string | - | Default proxy server (http / https / socks) for requests that do not specify their own |
42
+
43
+ ## Usage
44
+
45
+ ```bash
46
+ bun add @koishi-ce/plugin-proxy-agent
47
+ ```
48
+
49
+ ```yaml
50
+ plugins:
51
+ proxy-agent:
52
+ proxyAgent: "http://127.0.0.1:7890"
53
+ ```
54
+
55
+ Once enabled, `ctx.http` requests go through the configured proxy by default; individual requests may still override it via the `proxyAgent` option (an empty string disables the proxy).
56
+
57
+ ## License
58
+
59
+ [MIT](https://github.com/Koishi-CE/koishi/blob/main/LICENSE). This stub re-exports the MIT-licensed upstream @cordisjs/plugin-proxy-agent; see [NOTICE](https://github.com/Koishi-CE/koishi/blob/main/NOTICE) for attribution.
package/index.d.ts CHANGED
@@ -1 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026-present Koishi-CE contributors.
3
+
1
4
  export * from "@cordisjs/plugin-proxy-agent";
package/index.mjs CHANGED
@@ -1 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026-present Koishi-CE contributors.
3
+
1
4
  export * from "@cordisjs/plugin-proxy-agent";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@koishi-ce/plugin-proxy-agent",
3
3
  "description": "Proxy agent support for Koishi",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -21,13 +21,13 @@
21
21
  "license": "MIT",
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "git+https://github.com/cordiverse/http.git",
25
- "directory": "packages/proxy-agent"
24
+ "url": "git+https://github.com/Koishi-CE/koishi.git",
25
+ "directory": "plugins/infra/proxy"
26
26
  },
27
27
  "bugs": {
28
- "url": "https://github.com/cordiverse/http/issues"
28
+ "url": "https://github.com/Koishi-CE/koishi/issues"
29
29
  },
30
- "homepage": "https://github.com/cordiverse/http",
30
+ "homepage": "https://github.com/Koishi-CE/koishi/tree/main/plugins/infra/proxy",
31
31
  "keywords": [
32
32
  "http",
33
33
  "client",
@@ -35,7 +35,6 @@
35
35
  "fetch",
36
36
  "axios",
37
37
  "socks",
38
- "http",
39
38
  "https",
40
39
  "proxy",
41
40
  "agent",
@@ -50,11 +49,11 @@
50
49
  }
51
50
  },
52
51
  "peerDependencies": {
53
- "koishi": "^4.18.11"
52
+ "@koishi-ce/koishi": "^1.0.0"
54
53
  },
55
54
  "devDependencies": {
56
55
  "cordis": "^3.18.1",
57
- "@koishi-ce/koishi": "^1.0.0"
56
+ "@koishi-ce/koishi": "^1.0.8"
58
57
  },
59
58
  "dependencies": {
60
59
  "@cordisjs/plugin-proxy-agent": "^0.3.3"
package/readme.md DELETED
@@ -1,3 +0,0 @@
1
- # @koishi-ce/plugin-proxy-agent
2
-
3
- Proxy agent support for [Koishi](https://koishi.chat).