Răsfoiți Sursa

Disable broken darwin programmatic tun network config

Rod Hynes 8 ani în urmă
părinte
comite
1ba3f7ae24

+ 6 - 0
psiphon/common/tun/tun_darwin.go

@@ -244,6 +244,9 @@ func configureServerInterface(
 	config *ServerConfig,
 	tunDeviceName string) error {
 
+	// TODO: fix or remove the following broken code
+	return common.ContextError(unsupportedError)
+
 	// Set tun device network addresses and MTU
 
 	IPv4Address, IPv4Netmask, err := splitIPMask(serverIPv4AddressCIDR)
@@ -363,6 +366,9 @@ func configureClientInterface(
 	config *ClientConfig,
 	tunDeviceName string) error {
 
+	// TODO: fix or remove the following broken code
+	return common.ContextError(unsupportedError)
+
 	// Set tun device network addresses and MTU
 
 	IPv4Address, IPv4Netmask, err := splitIPMask(config.IPv4AddressCIDR)

+ 0 - 3
psiphon/common/tun/tun_unsupported.go

@@ -22,15 +22,12 @@
 package tun
 
 import (
-	"errors"
 	"net"
 	"os"
 
 	"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common"
 )
 
-var unsupportedError = errors.New("operation unsupported on this platform")
-
 func makeDeviceInboundBuffer(_ int) []byte {
 	return nil
 }

+ 3 - 0
psiphon/common/tun/utils.go

@@ -20,6 +20,7 @@
 package tun
 
 import (
+	"errors"
 	"fmt"
 	"net"
 	"os/exec"
@@ -28,6 +29,8 @@ import (
 	"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common"
 )
 
+var unsupportedError = errors.New("operation unsupported on this platform")
+
 // runNetworkConfigCommand execs a network config command, such as "ifconfig"
 // or "iptables". On platforms that support capabilities, the network config
 // capabilities of the current process is made available to the command