mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-04 12:27:37 +03:00
13 lines
288 B
Go
13 lines
288 B
Go
package control
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
func RoutingMark(mark uint32) Func {
|
|
return func(network, address string, conn syscall.RawConn) error {
|
|
return Raw(conn, func(fd uintptr) error {
|
|
return syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_MARK, int(mark))
|
|
})
|
|
}
|
|
}
|