freedom

package
v5.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 22 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProtocolReplacement_name = map[int32]string{
		0: "IDENTITY",
		1: "FORCE_TCP",
		2: "FORCE_UDP",
	}
	ProtocolReplacement_value = map[string]int32{
		"IDENTITY":  0,
		"FORCE_TCP": 1,
		"FORCE_UDP": 2,
	}
)

Enum value maps for ProtocolReplacement.

View Source
var (
	Config_DomainStrategy_name = map[int32]string{
		0: "AS_IS",
		1: "USE_IP",
		2: "USE_IP4",
		3: "USE_IP6",
	}
	Config_DomainStrategy_value = map[string]int32{
		"AS_IS":   0,
		"USE_IP":  1,
		"USE_IP4": 2,
		"USE_IP6": 3,
	}
)

Enum value maps for Config_DomainStrategy.

View Source
var File_proxy_freedom_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {
	DomainStrategy Config_DomainStrategy `` /* 156-byte string literal not displayed */
	// Deprecated: Marked as deprecated in proxy/freedom/config.proto.
	Timeout             uint32               `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
	DestinationOverride *DestinationOverride `protobuf:"bytes,3,opt,name=destination_override,json=destinationOverride,proto3" json:"destination_override,omitempty"`
	UserLevel           uint32               `protobuf:"varint,4,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"`
	ProtocolReplacement ProtocolReplacement  `` /* 169-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetDestinationOverride

func (x *Config) GetDestinationOverride() *DestinationOverride

func (*Config) GetDomainStrategy

func (x *Config) GetDomainStrategy() Config_DomainStrategy

func (*Config) GetProtocolReplacement added in v5.17.0

func (x *Config) GetProtocolReplacement() ProtocolReplacement

func (*Config) GetTimeout deprecated

func (x *Config) GetTimeout() uint32

Deprecated: Marked as deprecated in proxy/freedom/config.proto.

func (*Config) GetUserLevel

func (x *Config) GetUserLevel() uint32

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Config_DomainStrategy

type Config_DomainStrategy int32
const (
	Config_AS_IS   Config_DomainStrategy = 0
	Config_USE_IP  Config_DomainStrategy = 1
	Config_USE_IP4 Config_DomainStrategy = 2
	Config_USE_IP6 Config_DomainStrategy = 3
)

func (Config_DomainStrategy) Descriptor

func (Config_DomainStrategy) Enum

func (Config_DomainStrategy) EnumDescriptor deprecated

func (Config_DomainStrategy) EnumDescriptor() ([]byte, []int)

Deprecated: Use Config_DomainStrategy.Descriptor instead.

func (Config_DomainStrategy) Number

func (Config_DomainStrategy) String

func (x Config_DomainStrategy) String() string

func (Config_DomainStrategy) Type

type DestinationOverride

type DestinationOverride struct {
	Server *protocol.ServerEndpoint `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
	// contains filtered or unexported fields
}

func (*DestinationOverride) Descriptor deprecated

func (*DestinationOverride) Descriptor() ([]byte, []int)

Deprecated: Use DestinationOverride.ProtoReflect.Descriptor instead.

func (*DestinationOverride) GetServer

func (*DestinationOverride) ProtoMessage

func (*DestinationOverride) ProtoMessage()

func (*DestinationOverride) ProtoReflect

func (x *DestinationOverride) ProtoReflect() protoreflect.Message

func (*DestinationOverride) Reset

func (x *DestinationOverride) Reset()

func (*DestinationOverride) String

func (x *DestinationOverride) String() string

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler handles Freedom connections.

func (*Handler) Init

func (h *Handler) Init(config *Config, pm policy.Manager, d dns.Client) error

Init initializes the Handler with necessary parameters.

func (*Handler) Process

func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer internet.Dialer) error

Process implements proxy.Outbound.

type ProtocolReplacement added in v5.17.0

type ProtocolReplacement int32
const (
	ProtocolReplacement_IDENTITY  ProtocolReplacement = 0
	ProtocolReplacement_FORCE_TCP ProtocolReplacement = 1
	ProtocolReplacement_FORCE_UDP ProtocolReplacement = 2
)

func (ProtocolReplacement) Descriptor added in v5.17.0

func (ProtocolReplacement) Enum added in v5.17.0

func (ProtocolReplacement) EnumDescriptor deprecated added in v5.17.0

func (ProtocolReplacement) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProtocolReplacement.Descriptor instead.

func (ProtocolReplacement) Number added in v5.17.0

func (ProtocolReplacement) String added in v5.17.0

func (x ProtocolReplacement) String() string

func (ProtocolReplacement) Type added in v5.17.0

type SimplifiedConfig

type SimplifiedConfig struct {
	DestinationOverride *DestinationOverride `protobuf:"bytes,3,opt,name=destination_override,json=destinationOverride,proto3" json:"destination_override,omitempty"`
	ProtocolReplacement ProtocolReplacement  `` /* 169-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SimplifiedConfig) Descriptor deprecated

func (*SimplifiedConfig) Descriptor() ([]byte, []int)

Deprecated: Use SimplifiedConfig.ProtoReflect.Descriptor instead.

func (*SimplifiedConfig) GetDestinationOverride added in v5.17.0

func (x *SimplifiedConfig) GetDestinationOverride() *DestinationOverride

func (*SimplifiedConfig) GetProtocolReplacement added in v5.17.0

func (x *SimplifiedConfig) GetProtocolReplacement() ProtocolReplacement

func (*SimplifiedConfig) ProtoMessage

func (*SimplifiedConfig) ProtoMessage()

func (*SimplifiedConfig) ProtoReflect

func (x *SimplifiedConfig) ProtoReflect() protoreflect.Message

func (*SimplifiedConfig) Reset

func (x *SimplifiedConfig) Reset()

func (*SimplifiedConfig) String

func (x *SimplifiedConfig) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL