Files
MemRelay/projects/f5708b07-f0ea-42a4-b4ed-0e5443990ff9/SOCKS4 必须走 httpx-socks 不能走 httpx proxy.md
T
memrelay 574fce4a3e create: SOCKS4 必须走 httpx-socks 不能走 httpx proxy
MemRelay-Operation: memory-save:fact-socks4-httpx-20261115
MemRelay-Resource: bb630685-9427-4d2a-bd64-829c9e069aaa
2026-11-15 10:09:47 +08:00

20 lines
951 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: SOCKS4 必须走 httpx-socks 不能走 httpx proxy
type: fact
permalink: main/projects/f5708b07-f0ea-42a4-b4ed-0e5443990ff9/socks4-必须走-httpx-socks-不能走-httpx-proxy
stable_id: bb630685-9427-4d2a-bd64-829c9e069aaa
scope: project
memory_type: fact
project_id: f5708b07-f0ea-42a4-b4ed-0e5443990ff9
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 1
request_id: fact-socks4-httpx-20261115
created_at: '2026-11-15T02:09:40.172554+00:00'
updated_at: '2026-11-15T02:09:40.172554+00:00'
tags:
- proxy
- httpx
---
httpx 0.28 的 Proxy 只接受 http/https/socks5/socks5h。产品支持 SOCKS4,但直接把 socks4:// 传给 httpx.Client(proxy=) 会在构造时抛 Unknown scheme,代理页因此整页红字。修复:euniv.proxy.client_proxy_args 对 SOCKS 使用 httpx-socks 的 Sync/AsyncProxyTransport,HTTP/HTTPS 仍用 proxy=。探测和学习会话都走 sync_httpx_client / async_httpx_client。