github.com/kelleygo/clashcore@v1.0.2/component/dialer/mark_nonlinux.go (about)

     1  //go:build !linux
     2  
     3  package dialer
     4  
     5  import (
     6  	"net"
     7  	"net/netip"
     8  	"sync"
     9  
    10  	"github.com/kelleygo/clashcore/log"
    11  )
    12  
    13  var printMarkWarnOnce sync.Once
    14  
    15  func printMarkWarn() {
    16  	printMarkWarnOnce.Do(func() {
    17  		log.Warnln("Routing mark on socket is not supported on current platform")
    18  	})
    19  }
    20  
    21  func bindMarkToDialer(mark int, dialer *net.Dialer, _ string, _ netip.Addr) {
    22  	printMarkWarn()
    23  }
    24  
    25  func bindMarkToListenConfig(mark int, lc *net.ListenConfig, _, _ string) {
    26  	printMarkWarn()
    27  }