foxfetch 0.1.4__tar.gz → 0.1.6__tar.gz
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.
- {foxfetch-0.1.4 → foxfetch-0.1.6}/PKG-INFO +39 -55
- {foxfetch-0.1.4 → foxfetch-0.1.6}/README.md +38 -54
- {foxfetch-0.1.4 → foxfetch-0.1.6}/README.zh.md +36 -51
- {foxfetch-0.1.4 → foxfetch-0.1.6}/pyproject.toml +1 -1
- {foxfetch-0.1.4 → foxfetch-0.1.6}/src/foxfetch/__init__.py +1 -1
- {foxfetch-0.1.4 → foxfetch-0.1.6}/.gitignore +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/INSTALL.md +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/LICENSE +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/dsh/README.md +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/src/foxfetch/__main__.py +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/src/foxfetch/cli.py +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/src/foxfetch/config.py +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/src/foxfetch/contexts.py +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/src/foxfetch/doctor.py +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/src/foxfetch/engine.py +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/src/foxfetch/probe.py +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/src/foxfetch/server.py +0 -0
- {foxfetch-0.1.4 → foxfetch-0.1.6}/src/foxfetch/shapes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: foxfetch
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: Fetch pages through a real Firefox engine (ruyijs) for AI agents: pass bot checks, run the page's own JavaScript, then hand the identity to Chromium when a screenshot is needed.
|
|
5
5
|
Project-URL: Homepage, https://github.com/zhuchongba-01/foxfetch
|
|
6
6
|
Project-URL: Repository, https://github.com/zhuchongba-01/foxfetch
|
|
@@ -58,84 +58,68 @@ Description-Content-Type: text/markdown
|
|
|
58
58
|
[](https://www.npmjs.com/package/dsh-foxfetch)
|
|
59
59
|
[](LICENSE)
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
check, and read what only a browser can see. When a screenshot is needed, it hands the identity
|
|
64
|
-
it earned to Chromium.
|
|
61
|
+
Runs a page in a real Firefox engine to get past bot checks, then hands the identity to Chromium
|
|
62
|
+
when a screenshot is needed.
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Install in 30 seconds
|
|
69
|
-
|
|
70
|
-
**1. Install the service** (once per machine — **every host needs this, DSH included**):
|
|
64
|
+
## Install
|
|
71
65
|
|
|
72
66
|
```bash
|
|
73
67
|
pip install foxfetch
|
|
74
68
|
```
|
|
75
69
|
|
|
76
|
-
|
|
70
|
+
That is the service, and every host needs it. Then one of these two:
|
|
77
71
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
| You use | Run this next |
|
|
73
|
+
|---|---|
|
|
74
|
+
| **DeepSeek Harness** (DSH) | `pnpm add dsh-foxfetch` inside `~/.dsh/profiles/desktop`, add it to `dsh.profile.bundles`, restart → [steps](#deepseek-harness) |
|
|
75
|
+
| **Pi / Claude Code / Codex / other MCP client** | nothing to install, just a config entry → [steps](#pi) |
|
|
81
76
|
|
|
82
|
-
|
|
83
|
-
platforms:
|
|
77
|
+
### DSH, both commands together
|
|
84
78
|
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
┌───────────────┴────────────────┐
|
|
90
|
-
│ │
|
|
91
|
-
MCP clients (Pi, Claude Code, DeepSeek Harness
|
|
92
|
-
Codex, anything else) (native plugin API)
|
|
93
|
-
→ a config entry pointing → an npm plugin that forwards
|
|
94
|
-
at the command above to the command above
|
|
95
|
-
│ │
|
|
96
|
-
Pi: pi mcp add foxfetch cd ~/.dsh/profiles/desktop
|
|
97
|
-
-- python -m foxfetch pnpm add dsh-foxfetch
|
|
98
|
-
serve (+ add to dsh.profile.bundles)
|
|
79
|
+
```powershell
|
|
80
|
+
pip install foxfetch
|
|
81
|
+
cd "$env:USERPROFILE\.dsh\profiles\desktop"
|
|
82
|
+
pnpm add dsh-foxfetch
|
|
99
83
|
```
|
|
100
84
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
| **Pi** | MCP | `pi mcp add foxfetch -- python -m foxfetch serve` |
|
|
104
|
-
| **Claude Code** | MCP | `claude mcp add foxfetch -- python -m foxfetch serve` |
|
|
105
|
-
| **Codex** | MCP | a `[mcp_servers.foxfetch]` table in `~/.codex/config.toml` → [steps](#codex) |
|
|
106
|
-
| **DeepSeek Harness** | **npm plugin** | **two things**: the service from step 1 **plus** `pnpm add dsh-foxfetch` → [steps](#deepseek-harness) |
|
|
107
|
-
| **Other MCP client** | MCP | `command: python`, `args: ["-m", "foxfetch", "serve"]` |
|
|
85
|
+
Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that folder's `package.json` and restart
|
|
86
|
+
DSH. Exact file content: [DSH steps](#deepseek-harness).
|
|
108
87
|
|
|
109
|
-
|
|
88
|
+
### Everyone else, one config entry
|
|
110
89
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
entry pointing at `python -m foxfetch serve`, no package to add.
|
|
90
|
+
```bash
|
|
91
|
+
pi mcp add foxfetch -- python -m foxfetch serve # Pi
|
|
92
|
+
claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
|
|
93
|
+
```
|
|
116
94
|
|
|
117
|
-
|
|
95
|
+
Codex takes a table in `~/.codex/config.toml` ([steps](#codex)); any other MCP client takes
|
|
96
|
+
`command: python`, `args: ["-m", "foxfetch", "serve"]`.
|
|
118
97
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
# then add "dsh-foxfetch" to dsh.profile.bundles and restart DSH ([details](#deepseek-harness))
|
|
98
|
+
## Verify
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
python -m foxfetch doctor # expect "ok": true
|
|
124
102
|
```
|
|
125
103
|
|
|
126
|
-
|
|
104
|
+
Then ask your agent:
|
|
127
105
|
|
|
128
106
|
```
|
|
129
107
|
foxfetch_run(js="navigator.userAgent", url="https://example.com")
|
|
130
108
|
```
|
|
131
109
|
|
|
132
|
-
|
|
133
|
-
|
|
110
|
+
It must answer with `Firefox/160.0`. If it says `Python-urllib` or `HeadlessChrome`, the agent is
|
|
111
|
+
not reaching the engine — nothing else will work until that is fixed.
|
|
134
112
|
|
|
135
|
-
> **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent:
|
|
136
|
-
>
|
|
113
|
+
> **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent: you
|
|
114
|
+
> would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
|
|
137
115
|
|
|
138
|
-
|
|
116
|
+
## Why this exists
|
|
117
|
+
|
|
118
|
+
`curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch runs the site's own JavaScript in
|
|
119
|
+
a real Firefox engine (SpiderMonkey + Necko, no window, no renderer), so the TLS handshake and
|
|
120
|
+
the JS environment are those of a real browser — and it keeps that world alive between calls.
|
|
121
|
+
When a screenshot or a click is needed, `handoff` exports the identity it earned so Chromium can
|
|
122
|
+
finish the job.
|
|
139
123
|
|
|
140
124
|
## Detailed install
|
|
141
125
|
|
|
@@ -9,84 +9,68 @@
|
|
|
9
9
|
[](https://www.npmjs.com/package/dsh-foxfetch)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
check, and read what only a browser can see. When a screenshot is needed, it hands the identity
|
|
15
|
-
it earned to Chromium.
|
|
12
|
+
Runs a page in a real Firefox engine to get past bot checks, then hands the identity to Chromium
|
|
13
|
+
when a screenshot is needed.
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Install in 30 seconds
|
|
20
|
-
|
|
21
|
-
**1. Install the service** (once per machine — **every host needs this, DSH included**):
|
|
15
|
+
## Install
|
|
22
16
|
|
|
23
17
|
```bash
|
|
24
18
|
pip install foxfetch
|
|
25
19
|
```
|
|
26
20
|
|
|
27
|
-
|
|
21
|
+
That is the service, and every host needs it. Then one of these two:
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
| You use | Run this next |
|
|
24
|
+
|---|---|
|
|
25
|
+
| **DeepSeek Harness** (DSH) | `pnpm add dsh-foxfetch` inside `~/.dsh/profiles/desktop`, add it to `dsh.profile.bundles`, restart → [steps](#deepseek-harness) |
|
|
26
|
+
| **Pi / Claude Code / Codex / other MCP client** | nothing to install, just a config entry → [steps](#pi) |
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
platforms:
|
|
28
|
+
### DSH, both commands together
|
|
35
29
|
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
┌───────────────┴────────────────┐
|
|
41
|
-
│ │
|
|
42
|
-
MCP clients (Pi, Claude Code, DeepSeek Harness
|
|
43
|
-
Codex, anything else) (native plugin API)
|
|
44
|
-
→ a config entry pointing → an npm plugin that forwards
|
|
45
|
-
at the command above to the command above
|
|
46
|
-
│ │
|
|
47
|
-
Pi: pi mcp add foxfetch cd ~/.dsh/profiles/desktop
|
|
48
|
-
-- python -m foxfetch pnpm add dsh-foxfetch
|
|
49
|
-
serve (+ add to dsh.profile.bundles)
|
|
30
|
+
```powershell
|
|
31
|
+
pip install foxfetch
|
|
32
|
+
cd "$env:USERPROFILE\.dsh\profiles\desktop"
|
|
33
|
+
pnpm add dsh-foxfetch
|
|
50
34
|
```
|
|
51
35
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
| **Pi** | MCP | `pi mcp add foxfetch -- python -m foxfetch serve` |
|
|
55
|
-
| **Claude Code** | MCP | `claude mcp add foxfetch -- python -m foxfetch serve` |
|
|
56
|
-
| **Codex** | MCP | a `[mcp_servers.foxfetch]` table in `~/.codex/config.toml` → [steps](#codex) |
|
|
57
|
-
| **DeepSeek Harness** | **npm plugin** | **two things**: the service from step 1 **plus** `pnpm add dsh-foxfetch` → [steps](#deepseek-harness) |
|
|
58
|
-
| **Other MCP client** | MCP | `command: python`, `args: ["-m", "foxfetch", "serve"]` |
|
|
36
|
+
Then add `"dsh-foxfetch"` to `dsh.profile.bundles` in that folder's `package.json` and restart
|
|
37
|
+
DSH. Exact file content: [DSH steps](#deepseek-harness).
|
|
59
38
|
|
|
60
|
-
|
|
39
|
+
### Everyone else, one config entry
|
|
61
40
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
entry pointing at `python -m foxfetch serve`, no package to add.
|
|
41
|
+
```bash
|
|
42
|
+
pi mcp add foxfetch -- python -m foxfetch serve # Pi
|
|
43
|
+
claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
|
|
44
|
+
```
|
|
67
45
|
|
|
68
|
-
|
|
46
|
+
Codex takes a table in `~/.codex/config.toml` ([steps](#codex)); any other MCP client takes
|
|
47
|
+
`command: python`, `args: ["-m", "foxfetch", "serve"]`.
|
|
69
48
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
# then add "dsh-foxfetch" to dsh.profile.bundles and restart DSH ([details](#deepseek-harness))
|
|
49
|
+
## Verify
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
python -m foxfetch doctor # expect "ok": true
|
|
75
53
|
```
|
|
76
54
|
|
|
77
|
-
|
|
55
|
+
Then ask your agent:
|
|
78
56
|
|
|
79
57
|
```
|
|
80
58
|
foxfetch_run(js="navigator.userAgent", url="https://example.com")
|
|
81
59
|
```
|
|
82
60
|
|
|
83
|
-
|
|
84
|
-
|
|
61
|
+
It must answer with `Firefox/160.0`. If it says `Python-urllib` or `HeadlessChrome`, the agent is
|
|
62
|
+
not reaching the engine — nothing else will work until that is fixed.
|
|
85
63
|
|
|
86
|
-
> **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent:
|
|
87
|
-
>
|
|
64
|
+
> **One entry per host.** Never add both an MCP entry and the DSH plugin to the same agent: you
|
|
65
|
+
> would get the same seven tools twice (`foxfetch_run` and `mcp__foxfetch__run`).
|
|
88
66
|
|
|
89
|
-
|
|
67
|
+
## Why this exists
|
|
68
|
+
|
|
69
|
+
`curl` gets a 403. Headless Chrome gets fingerprinted. foxfetch runs the site's own JavaScript in
|
|
70
|
+
a real Firefox engine (SpiderMonkey + Necko, no window, no renderer), so the TLS handshake and
|
|
71
|
+
the JS environment are those of a real browser — and it keeps that world alive between calls.
|
|
72
|
+
When a screenshot or a click is needed, `handoff` exports the identity it earned so Chromium can
|
|
73
|
+
finish the job.
|
|
90
74
|
|
|
91
75
|
## Detailed install
|
|
92
76
|
|
|
@@ -9,81 +9,66 @@
|
|
|
9
9
|
[](https://www.npmjs.com/package/dsh-foxfetch)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
+ Necko,无窗口、不渲染)执行站点自己的 JavaScript,过掉风控,读出只有浏览器才能看到的东西。
|
|
14
|
-
需要截图时,把它挣到的身份交给 Chromium。
|
|
12
|
+
在真 Firefox 引擎里跑页面,用来过风控;需要截图时把身份交给 Chromium。
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## 30 秒装好
|
|
19
|
-
|
|
20
|
-
**第 1 步:装服务**(每台机器装一次 —— **所有宿主都要,DSH 也不例外**)
|
|
14
|
+
## 安装
|
|
21
15
|
|
|
22
16
|
```bash
|
|
23
17
|
pip install foxfetch
|
|
24
18
|
```
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
这是服务本体,**所有宿主都要装**。然后按你用的软件二选一:
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
| 你用 | 接着执行 |
|
|
23
|
+
|---|---|
|
|
24
|
+
| **DeepSeek Harness**(DSH) | 在 `~/.dsh/profiles/desktop` 里 `pnpm add dsh-foxfetch`,再把它加进 `dsh.profile.bundles`,重启 → [步骤](#deepseek-harness) |
|
|
25
|
+
| **Pi / Claude Code / Codex / 其它 MCP 客户端** | 不用装包,只要写一段配置 → [步骤](#pi) |
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
### DSH:两条命令连起来
|
|
33
28
|
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
┌───────────────┴────────────────┐
|
|
39
|
-
│ │
|
|
40
|
-
MCP 客户端(Pi、Claude Code、 DeepSeek Harness
|
|
41
|
-
Codex、其它) (有原生插件机制)
|
|
42
|
-
→ 写一段配置指向上面那条命令 → 装一个 npm 插件,插件再转发给上面
|
|
43
|
-
│ │
|
|
44
|
-
Pi: pi mcp add foxfetch cd ~/.dsh/profiles/desktop
|
|
45
|
-
-- python -m foxfetch pnpm add dsh-foxfetch
|
|
46
|
-
serve (再登记到 dsh.profile.bundles)
|
|
29
|
+
```powershell
|
|
30
|
+
pip install foxfetch
|
|
31
|
+
cd "$env:USERPROFILE\.dsh\profiles\desktop"
|
|
32
|
+
pnpm add dsh-foxfetch
|
|
47
33
|
```
|
|
48
34
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
| **Pi** | MCP | `pi mcp add foxfetch -- python -m foxfetch serve` |
|
|
52
|
-
| **Claude Code** | MCP | `claude mcp add foxfetch -- python -m foxfetch serve` |
|
|
53
|
-
| **Codex** | MCP | 在 `~/.codex/config.toml` 加一个 `[mcp_servers.foxfetch]` 表 → [步骤](#codex) |
|
|
54
|
-
| **DeepSeek Harness** | **npm 插件** | **装两样**:第 1 步的服务 **加上** `pnpm add dsh-foxfetch` → [步骤](#deepseek-harness) |
|
|
55
|
-
| **其它 MCP 客户端** | MCP | `command: python`,`args: ["-m", "foxfetch", "serve"]` |
|
|
35
|
+
然后把 `"dsh-foxfetch"` 加进这个目录下 `package.json` 的 `dsh.profile.bundles`,重启 DSH。
|
|
36
|
+
完整文件内容见 [DSH 步骤](#deepseek-harness)。
|
|
56
37
|
|
|
57
|
-
|
|
38
|
+
### 其它软件:只写一段配置
|
|
58
39
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
指向 `python -m foxfetch serve`,**不需要额外装包**。
|
|
40
|
+
```bash
|
|
41
|
+
pi mcp add foxfetch -- python -m foxfetch serve # Pi
|
|
42
|
+
claude mcp add foxfetch -- python -m foxfetch serve # Claude Code
|
|
43
|
+
```
|
|
64
44
|
|
|
65
|
-
|
|
45
|
+
Codex 是在 `~/.codex/config.toml` 里加表([步骤](#codex));其它 MCP 客户端用
|
|
46
|
+
`command: python`、`args: ["-m", "foxfetch", "serve"]`。
|
|
66
47
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
# 然后把 "dsh-foxfetch" 加进 dsh.profile.bundles,重启 DSH([详细步骤](#deepseek-harness))
|
|
48
|
+
## 验证
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
python -m foxfetch doctor # 应输出 "ok": true
|
|
72
52
|
```
|
|
73
53
|
|
|
74
|
-
|
|
54
|
+
然后让你的 agent 调用:
|
|
75
55
|
|
|
76
56
|
```
|
|
77
57
|
foxfetch_run(js="navigator.userAgent", url="https://example.com")
|
|
78
58
|
```
|
|
79
59
|
|
|
80
|
-
答案里必须出现 `Firefox/160.0`。如果出现 `Python-urllib` 或 `HeadlessChrome`,说明 agent
|
|
81
|
-
|
|
60
|
+
答案里必须出现 `Firefox/160.0`。如果出现 `Python-urllib` 或 `HeadlessChrome`,说明 agent 没连上
|
|
61
|
+
引擎 —— 这个问题不解决,后面全是假的。
|
|
82
62
|
|
|
83
|
-
> **一个宿主只装一个入口。** 同一个 agent 里不要既加 MCP 条目又装 DSH
|
|
84
|
-
>
|
|
63
|
+
> **一个宿主只装一个入口。** 同一个 agent 里不要既加 MCP 条目又装 DSH 插件,否则会出现两套
|
|
64
|
+
> 同样的 7 个工具(`foxfetch_run` 和 `mcp__foxfetch__run`)。
|
|
85
65
|
|
|
86
|
-
|
|
66
|
+
## 为什么需要它
|
|
67
|
+
|
|
68
|
+
`curl` 拿回来 403,无头 Chrome 被指纹识别拦掉。foxfetch 在**真 Firefox 引擎**(SpiderMonkey +
|
|
69
|
+
Necko,无窗口、不渲染)里执行站点自己的 JavaScript,所以 TLS 握手和 JS 环境都是真浏览器的,
|
|
70
|
+
而且这个环境在调用之间保持存活。需要截图或点击时,`handoff` 把挣到的身份导出来,交给 Chromium
|
|
71
|
+
完成剩下的活。
|
|
87
72
|
|
|
88
73
|
## 详细安装
|
|
89
74
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "foxfetch"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.6"
|
|
8
8
|
description = "Fetch pages through a real Firefox engine (ruyijs) for AI agents: pass bot checks, run the page's own JavaScript, then hand the identity to Chromium when a screenshot is needed."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|