mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-05 05:27:31 +00:00
draft: Tun respond ICMP port unreachable when rejecting UDP packets
This commit is contained in:
@@ -274,6 +274,10 @@ func (s *packetAdapter) Key() string {
|
||||
return s.key
|
||||
}
|
||||
|
||||
func (s *packetAdapter) Upstream() any {
|
||||
return s.UDPPacket
|
||||
}
|
||||
|
||||
func NewPacketAdapter(packet UDPPacket, metadata *Metadata) PacketAdapter {
|
||||
return &packetAdapter{
|
||||
packet,
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
package constant
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/metacubex/sing/common/exceptions"
|
||||
)
|
||||
|
||||
// Rule Type
|
||||
const (
|
||||
Domain RuleType = iota
|
||||
@@ -129,3 +135,7 @@ type RuleGroup interface {
|
||||
Rule
|
||||
GetRecodeSize() int
|
||||
}
|
||||
|
||||
var (
|
||||
ErrResetByRule = exceptions.Cause(io.EOF, "reset by rule") // TODO: replace function from sing
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user