mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-26 02:21:28 +00:00
24 lines
522 B
Go
24 lines
522 B
Go
|
package adapter
|
||
|
|
||
|
import (
|
||
|
"net/netip"
|
||
|
|
||
|
"github.com/sagernet/sing-dns"
|
||
|
)
|
||
|
|
||
|
type FakeIPStore interface {
|
||
|
Service
|
||
|
Contains(address netip.Addr) bool
|
||
|
Create(domain string, strategy dns.DomainStrategy) (netip.Addr, error)
|
||
|
Lookup(address netip.Addr) (string, bool)
|
||
|
Reset() error
|
||
|
}
|
||
|
|
||
|
type FakeIPStorage interface {
|
||
|
FakeIPMetadata() *FakeIPMetadata
|
||
|
FakeIPSaveMetadata(metadata *FakeIPMetadata) error
|
||
|
FakeIPStore(address netip.Addr, domain string) error
|
||
|
FakeIPLoad(address netip.Addr) (string, bool)
|
||
|
FakeIPReset() error
|
||
|
}
|