mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-03 00:11:35 +01:00
This commit enables user to set service backend to remote destinations, that can be a partial URL or a full URL. The commit also prevents user to set remote destinations on linux system when socket mark is not working. For user on any version of mac extension they can't serve a service either. The socket mark usability is determined by a new local api. Fixes tailscale/corp#24783 Signed-off-by: KevinLiang10 <37811973+KevinLiang10@users.noreply.github.com>
27 lines
498 B
Go
27 lines
498 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build !linux && !windows && !darwin
|
|
|
|
package netns
|
|
|
|
import (
|
|
"syscall"
|
|
|
|
"tailscale.com/net/netmon"
|
|
"tailscale.com/types/logger"
|
|
)
|
|
|
|
func control(logger.Logf, *netmon.Monitor) func(network, address string, c syscall.RawConn) error {
|
|
return controlC
|
|
}
|
|
|
|
// controlC does nothing to c.
|
|
func controlC(network, address string, c syscall.RawConn) error {
|
|
return nil
|
|
}
|
|
|
|
func UseSocketMark() bool {
|
|
return false
|
|
}
|