github.com/chwjbn/xclash@v0.2.0/component/dialer/mark_nonlinux.go (about)

     1  //go:build !linux
     2  // +build !linux
     3  
     4  package dialer
     5  
     6  import (
     7  	"net"
     8  	"sync"
     9  
    10  	"github.com/chwjbn/xclash/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, _ net.IP) {
    22  	printMarkWarn()
    23  }
    24  
    25  func bindMarkToListenConfig(mark int, lc *net.ListenConfig, _, address string) {
    26  	printMarkWarn()
    27  }