mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 08:44:29 +00:00
fix: revert ih rule
This commit is contained in:
parent
97263044f0
commit
47bb5874f2
@ -57,31 +57,16 @@ func (s *Server) NftSetDesync(tx *knftables.Transaction, table *knftables.Table)
|
||||
Rule: netfilter.NftRuleIgnorePorts,
|
||||
})
|
||||
|
||||
if netfilter.NftIHAvailable() {
|
||||
tx.Add(&knftables.Rule{
|
||||
Chain: chain.Name,
|
||||
Rule: knftables.Concat(
|
||||
"meta l4proto tcp",
|
||||
"ct state established",
|
||||
"ct direction original",
|
||||
"@ih,0,8 & 0 == 0",
|
||||
fmt.Sprintf("ct bytes < %d", s.CtByte),
|
||||
fmt.Sprintf("ct packets < %d", s.CtPackets),
|
||||
fmt.Sprintf("counter queue num %d bypass", s.nfqServer.QueueNum),
|
||||
),
|
||||
})
|
||||
} else {
|
||||
tx.Add(&knftables.Rule{
|
||||
Chain: chain.Name,
|
||||
Rule: knftables.Concat(
|
||||
"meta l4proto tcp",
|
||||
"ct state established",
|
||||
"ct direction original",
|
||||
"ip length > 41",
|
||||
fmt.Sprintf("ct bytes < %d", s.CtByte),
|
||||
fmt.Sprintf("ct packets < %d", s.CtPackets),
|
||||
fmt.Sprintf("counter queue num %d bypass", s.nfqServer.QueueNum),
|
||||
),
|
||||
})
|
||||
}
|
||||
tx.Add(&knftables.Rule{
|
||||
Chain: chain.Name,
|
||||
Rule: knftables.Concat(
|
||||
"meta l4proto tcp",
|
||||
"ct state established",
|
||||
"ct direction original",
|
||||
"ip length > 41",
|
||||
fmt.Sprintf("ct bytes < %d", s.CtByte),
|
||||
fmt.Sprintf("ct packets < %d", s.CtPackets),
|
||||
fmt.Sprintf("counter queue num %d bypass", s.nfqServer.QueueNum),
|
||||
),
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user