package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Apr 18, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package clientip provides client IP extraction utilities.
客户端 IP 提取工具。
FromRemote parses IP from remote address string.
FromRemote 从远程地址字符串解析 IP。
FromRequest extracts client IP using the provided trust policy.
FromRequest 按传入的信任策略提取客户端 IP。
Example / 示例:
ip, ok := clientip.FromRequest(r, clientip.Options{})
Options controls whether forwarded headers may be trusted.
Options 控制是否允许信任转发头。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.