github.com/sagernet/sing@v0.4.0-beta.19.0.20240518125136-f67a0988a636/common/control/bind_finder.go (about) 1 package control 2 3 import ( 4 "net/netip" 5 ) 6 7 type InterfaceFinder interface { 8 InterfaceIndexByName(name string) (int, error) 9 InterfaceNameByIndex(index int) (string, error) 10 InterfaceByAddr(addr netip.Addr) (*Interface, error) 11 } 12 13 type Interface struct { 14 Index int 15 MTU int 16 Name string 17 Addresses []netip.Prefix 18 }