mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-25 18:11:28 +00:00
25 lines
562 B
Go
25 lines
562 B
Go
package adapter
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/sagernet/sing-box/log"
|
|
"github.com/sagernet/sing-box/option"
|
|
N "github.com/sagernet/sing/common/network"
|
|
)
|
|
|
|
// Note: for proxy protocols, outbound creates early connections by default.
|
|
|
|
type Outbound interface {
|
|
Type() string
|
|
Tag() string
|
|
Network() []string
|
|
Dependencies() []string
|
|
N.Dialer
|
|
}
|
|
|
|
type OutboundRegistry interface {
|
|
option.OutboundOptionsRegistry
|
|
CreateOutbound(ctx context.Context, router Router, logger log.ContextLogger, tag string, outboundType string, options any) (Outbound, error)
|
|
}
|