Clash.Meta/component/dialer/mark_nonlinux.go

28 lines
473 B
Go
Raw Normal View History

2021-11-08 16:59:48 +08:00
//go:build !linux
package dialer
import (
"net"
2022-04-20 01:52:51 +08:00
"net/netip"
2021-11-08 16:59:48 +08:00
"sync"
2023-11-03 21:01:45 +08:00
"github.com/metacubex/mihomo/log"
2021-11-08 16:59:48 +08:00
)
var printMarkWarnOnce sync.Once
func printMarkWarn() {
printMarkWarnOnce.Do(func() {
log.Warnln("Routing mark on socket is not supported on current platform")
})
}
2022-04-20 01:52:51 +08:00
func bindMarkToDialer(mark int, dialer *net.Dialer, _ string, _ netip.Addr) {
2021-11-08 16:59:48 +08:00
printMarkWarn()
}
2022-04-20 01:52:51 +08:00
func bindMarkToListenConfig(mark int, lc *net.ListenConfig, _, _ string) {
2021-11-08 16:59:48 +08:00
printMarkWarn()
}