LangChain 代理配置
LLM application framework — its loaders fetch the open web. 按下面的配置把它指向 Eveses 住宅池 — 地区写在用户名里,所以换国家不需要动其他任何设置。
proxy.eveses.com:12321 · SOCKS5 在 32325 · 199 个国家 · $7.35/GB 起
LangChain's document loaders each hold their own HTTP client, so there is no single place to set a proxy. `WebBaseLoader` takes `requests_kwargs`; `AsyncHtmlLoader` does not, and needs the session passed in.
配置
from langchain_community.document_loaders import WebBaseLoader
proxy = "http://eveses_user_country-us:[email protected]:12321"
loader = WebBaseLoader(
"https://target-site.com",
requests_kwargs={"proxies": {"http": proxy, "https": proxy}, "timeout": 30},
)
docs = loader.load()LangChain 相关说明
Give each agent run its own `_session-…` token if you need the same exit IP for a multi-step task.
Tool calls that hit an API rather than a page usually do not need the proxy — route only the web loaders.
换国家而不动 LangChain
eveses_user_country-deeveses_user_country-de_session-ab12cd34_lifetime-30m地区和会话都写在用户名里,而不是主机或端口。换国家时本页所有配置保持原样 — 你只改一个字符串。可定位 199 个国家,其中大多数还支持城市与州/省令牌。