gost_software/sockopts_linux.go
IndexDoge 8404317ada feat: add bind interface
fix: clone route without interface and mark config
2022-04-17 17:12:55 +08:00

11 lines
311 B
Go

package gost
import "syscall"
func setSocketMark(fd int, value int) (e error) {
return syscall.SetsockoptInt(fd, syscall.SOL_SOCKET, syscall.SO_MARK, value)
}
func setSocketInterface(fd int, value string) (e error) {
return syscall.SetsockoptString(fd, syscall.SOL_SOCKET, syscall.SO_BINDTODEVICE, value)
}