Add tun inbound for linux

This commit is contained in:
世界
2022-07-09 19:18:37 +08:00
parent c463d0cf80
commit 730144cc26
19 changed files with 623 additions and 22 deletions

16
inbound/tun_disabled.go Normal file
View File

@@ -0,0 +1,16 @@
//go:build no_tun
package inbound
import (
"context"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
)
func NewTun(ctx context.Context, router adapter.Router, logger log.Logger, tag string, options option.TunInboundOptions) (adapter.Inbound, error) {
return nil, E.New("tun disabled in this build")
}