Feature: SOURCE-IP-CIDR rule type (#96)

This commit is contained in:
宋辰文
2019-02-02 21:03:13 +08:00
committed by Dreamacro
parent bfe51e46b0
commit 42d33fe629
10 changed files with 39 additions and 15 deletions

View File

@ -32,8 +32,10 @@ func (h *HTTPAdapter) Conn() net.Conn {
// NewHTTP is HTTPAdapter generator
func NewHTTP(request *http.Request, conn net.Conn) *HTTPAdapter {
metadata := parseHTTPAddr(request)
metadata.SourceIP = parseSourceIP(conn)
return &HTTPAdapter{
metadata: parseHTTPAddr(request),
metadata: metadata,
R: request,
conn: conn,
}