Discover Packages
github.com/Mag1cFall/Gemini-Web2API
internal
proxypool
package
Version:
v0.1.5
Opens a new window with list of versions in this module.
Published: Oct 17, 2026
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
System 返回环境变量或操作系统设置中作用于 Gemini 的代理 URL,没有设置时返回空
Pool 是未设置固定代理的账号共用的代理池:每个账号绑定一个代理,代理不可用时改绑到可用代理中账号最少的一个,代理列表变化时在可用代理间均衡
Assign 返回账号使用的代理:已绑定的代理可用时沿用,否则绑定可用代理中账号最少的一个;全部不可用时保持原绑定,代理池为空时返回系统代理
Check 以 probe 并行检测全部代理并更新状态,返回绑定在不可用代理上、且有可用代理可改绑的账号
Pick 返回可用代理中账号最少的一个且不绑定,代理池为空时返回系统代理
SetProxies 替换代理列表,仍在列表中的代理保留检测结果与绑定,已删除代理上的账号改绑到账号最少的可用代理,再以最少的改绑使可用代理绑定的账号数相差不超过一个
Status 返回代理池中每个代理的状态,代理 URL 隐去密码
type Status struct {
URL string `json:"url"`
Healthy bool `json:"healthy"`
CheckedAt time .Time `json:"checked_at,omitzero"`
LatencyMS int64 `json:"latency_ms"`
Error string `json:"error,omitempty"`
Accounts []string `json:"accounts"`
}
Status 是代理池中一个代理的当前状态与绑定的账号
Source Files
¶
Click to show internal directories.
Click to hide internal directories.