macos build, linux tun hack
This commit is contained in:
1 parent
9639defdd4
commit
76ab72db2e
18 files changed
+719
-64
No files matched your search
@@ -0,0 +1,35 @@
|
||||
//go:build !windows && !linux && !darwin
|
||||
|
||||
package desktoptun
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net"
|
||||
)
|
||||
|
||||
var errUnsupported = errors.New("desktoptun: only supported on windows, linux and darwin")
|
||||
|
||||
type Config struct {
|
||||
AdapterName string
|
||||
TunnelIP string
|
||||
TunnelMask string
|
||||
TunnelPeer string
|
||||
MTU int
|
||||
DNSServers []string
|
||||
SocksHost string
|
||||
SocksPort int
|
||||
SocksUser string
|
||||
SocksPass string
|
||||
LogFn func(format string, args ...any)
|
||||
}
|
||||
|
||||
type Tunnel struct{}
|
||||
|
||||
func New(_ Config) (*Tunnel, error) { return nil, errUnsupported }
|
||||
func (*Tunnel) Start() error { return errUnsupported }
|
||||
func (*Tunnel) Stop() {}
|
||||
func (*Tunnel) AddBypassIP(_ net.IP) error { return errUnsupported }
|
||||
func (*Tunnel) AddBypassHost(_ string) ([]net.IP, error) {
|
||||
return nil, errUnsupported
|
||||
}
|
||||
func (*Tunnel) AddBypassFromCandidate(_ string) error { return errUnsupported }
|
||||
Reference in new issue
Block a user