Documentation
¶
Index ¶
- Variables
- func DialContextWithMetadata(dialer network.Dialer, ctx context.Context, network, addr string, ...) (net.Conn, error)
- type InjectOutbound
- type Metadata
- type MetadataOutbound
- type MinecraftMetadata
- type Outbound
- type OutboundReloadOptions
- type Protocol
- type RouteResourceProvider
- type Router
- type SRVMetadata
- type SRVOutbound
- type Service
- type TLSMetadata
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInjectionRequired = errors.New("injection required")
Functions ¶
Types ¶
type InjectOutbound ¶
type Metadata ¶
type Metadata struct {
ConnectionID string
ServiceName string
SniffedProtocol Protocol
SourceAddress netip.AddrPort
DestinationHostname string
DestinationPort uint16
SRV *SRVMetadata
Minecraft *MinecraftMetadata
TLS *TLSMetadata
Custom map[string]any
}
func (*Metadata) GenerateID ¶
func (m *Metadata) GenerateID()
type MetadataOutbound ¶
type MinecraftMetadata ¶
type MinecraftMetadata struct {
ProtocolVersion uint
PlayerName string
OriginDestination string
RewrittenDestination string
OriginPort uint16
RewrittenPort uint16
UUID [16]byte
NextState int8
SniffPosition int
// contains filtered or unexported fields
}
func (*MinecraftMetadata) CleanOriginDestination ¶
func (m *MinecraftMetadata) CleanOriginDestination() (clean string)
func (*MinecraftMetadata) FMLMarkup ¶
func (m *MinecraftMetadata) FMLMarkup() string
func (*MinecraftMetadata) IsFML ¶
func (m *MinecraftMetadata) IsFML() bool
func (*MinecraftMetadata) Valid ¶
func (m *MinecraftMetadata) Valid() bool
type OutboundReloadOptions ¶
type OutboundReloadOptions struct {
Router Router
Config *config.Outbound
Lists map[string]set.StringSet
}
func (*OutboundReloadOptions) FindListsByTag ¶
func (o *OutboundReloadOptions) FindListsByTag(tags []string) ([]set.StringSet, error)
func (*OutboundReloadOptions) FindOutboundByName ¶
func (o *OutboundReloadOptions) FindOutboundByName(name string) (Outbound, error)
type RouteResourceProvider ¶
type Router ¶
type Router interface {
RouteResourceProvider
HandleConnection(conn net.Conn, metadata *Metadata)
}
type SRVMetadata ¶
type SRVMetadata struct {
ServiceName string
}
type SRVOutbound ¶
type TLSMetadata ¶
type TLSMetadata struct {
SNI string
}
Click to show internal directories.
Click to hide internal directories.