Exclude gVisor for unsupported arch

This commit is contained in:
世界
2022-07-17 11:16:13 +08:00
parent 9debfd4cc6
commit 392a9da692
6 changed files with 77 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
//go:build linux || windows
package inbound
import (

16
inbound/tun_stub.go Normal file
View File

@@ -0,0 +1,16 @@
//go:build !linux && !windows
package inbound
import (
"context"
"os"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
)
func NewTun(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.TunInboundOptions) (adapter.Inbound, error) {
return nil, os.ErrInvalid
}