github.com/metacubex/mihomo@v1.18.5/constant/ebpf.go (about) 1 package constant 2 3 import ( 4 "net/netip" 5 6 "github.com/metacubex/mihomo/transport/socks5" 7 ) 8 9 const ( 10 BpfFSPath = "/sys/fs/bpf/mihomo" 11 12 TcpAutoRedirPort = 't'<<8 | 'r'<<0 13 MihomoTrafficMark = 'c'<<24 | 'l'<<16 | 't'<<8 | 'm'<<0 14 ) 15 16 type EBpf interface { 17 Start() error 18 Close() 19 Lookup(srcAddrPort netip.AddrPort) (socks5.Addr, error) 20 }