Inbound rule support

This commit is contained in:
世界
2022-07-02 14:07:50 +08:00
parent 9f4c0ff624
commit 7c57eb70e8
34 changed files with 622 additions and 247 deletions

View File

@@ -5,9 +5,9 @@ import (
"net"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/config"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common/auth"
M "github.com/sagernet/sing/common/metadata"
"github.com/sagernet/sing/protocol/socks"
@@ -20,7 +20,7 @@ type Socks struct {
authenticator auth.Authenticator
}
func NewSocks(ctx context.Context, router adapter.Router, logger log.Logger, tag string, options *config.SimpleInboundOptions) *Socks {
func NewSocks(ctx context.Context, router adapter.Router, logger log.Logger, tag string, options *option.SimpleInboundOptions) *Socks {
inbound := &Socks{
myInboundAdapter{
protocol: C.TypeSocks,