feat: RULE-SET in rules support ,src option

should only be used with `ipcidr` behavior
This commit is contained in:
wwqgtxx
2024-08-29 23:49:16 +08:00
parent a96f72ade4
commit 763a127287
5 changed files with 29 additions and 10 deletions

View File

@@ -302,3 +302,10 @@ func (m *Metadata) SetRemoteAddress(rawAddress string) error {
return nil
}
func (m *Metadata) SwapSrcDst() {
m.SrcIP, m.DstIP = m.DstIP, m.SrcIP
m.SrcPort, m.DstPort = m.DstPort, m.SrcPort
m.SrcIPASN, m.DstIPASN = m.DstIPASN, m.SrcIPASN
m.SrcGeoIP, m.DstGeoIP = m.DstGeoIP, m.SrcGeoIP
}