shadow1ng/fscan · error
network_rate_limited
network_rate_limited
Error message
%s
What it means
Deprecated WrapperTcpWithTimeout helper (used by libs/grdp) rejects the dial because CanSendPacket() reported the global packet limiter (count or rate cap) blocks a new connection to this address; the localized message carries the address and reason.
Source
Thrown at common/network.go:128
}
// 无代理配置,使用直连
config.Type = proxy.ProxyTypeNone
return config
}
// =============================================================================
// TCP 连接
// =============================================================================
// Deprecated: WrapperTcpWithTimeout 仅供 libs/grdp 兼容使用,新代码请用 ScanSession.DialTCP
//
//nolint:revive
func WrapperTcpWithTimeout(network, address string, timeout time.Duration) (net.Conn, error) {
// 检查发包限制 - 在代理连接前进行控制
if canSend, reason := CanSendPacket(); !canSend {
LogError(i18n.Tr("tcp_connection_restricted", address, reason))
return nil, fmt.Errorf("%s", i18n.Tr("network_rate_limited", reason))
}
// 获取全局拨号器(复用,避免重复创建)
dialer, err := getGlobalDialer(timeout)
if err != nil {
LogError(i18n.Tr("proxy_dialer_failed", err))
GetGlobalState().IncrementTCPFailedPacketCount()
return nil, err
}
// 使用代理拨号器连接
conn, err := dialer.DialContext(context.Background(), network, address)
// 统计TCP包数量 - 无论是否使用代理都要计数
if err != nil {
GetGlobalState().IncrementTCPFailedPacketCount()
LogDebug(i18n.Tr("connection_failed", address, err))
return nil, errView on GitHub (pinned to 95cc12e753)
Solutions
- Raise or disable the packet limit flags if the traffic is expected
- Reduce concurrent connections to stay under the rate cap
- Postpone and retry the dial once the limiter window resets
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at common/network.go:128 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06).
Data as JSON: /api/errors/e52ce42a27874667.
Report an issue: GitHub.