Documentation ¶
Index ¶
- Constants
- func WrapWithFlag(flag flags.PacketTypeFlag, data []byte) ([]byte, error)
- type ClientConfig
- func (*ClientConfig) Descriptor() ([]byte, []int)
- func (m *ClientConfig) GetHost() string
- func (m *ClientConfig) GetId() string
- func (m *ClientConfig) GetPort() string
- func (m *ClientConfig) GetProvider() *MixConfig
- func (m *ClientConfig) GetPubKey() []byte
- func (*ClientConfig) ProtoMessage()
- func (m *ClientConfig) Reset()
- func (m *ClientConfig) String() string
- func (m *ClientConfig) XXX_DiscardUnknown()
- func (m *ClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientConfig) XXX_Merge(src proto.Message)
- func (m *ClientConfig) XXX_Size() int
- func (m *ClientConfig) XXX_Unmarshal(b []byte) error
- type E2EPath
- type GeneralPacket
- func (*GeneralPacket) Descriptor() ([]byte, []int)
- func (m *GeneralPacket) GetData() []byte
- func (m *GeneralPacket) GetFlag() []byte
- func (*GeneralPacket) ProtoMessage()
- func (m *GeneralPacket) Reset()
- func (m *GeneralPacket) String() string
- func (m *GeneralPacket) XXX_DiscardUnknown()
- func (m *GeneralPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GeneralPacket) XXX_Merge(src proto.Message)
- func (m *GeneralPacket) XXX_Size() int
- func (m *GeneralPacket) XXX_Unmarshal(b []byte) error
- type MixConfig
- func (*MixConfig) Descriptor() ([]byte, []int)
- func (m *MixConfig) GetHost() string
- func (m *MixConfig) GetId() string
- func (m *MixConfig) GetLayer() uint64
- func (m *MixConfig) GetPort() string
- func (m *MixConfig) GetPubKey() []byte
- func (*MixConfig) ProtoMessage()
- func (m *MixConfig) Reset()
- func (m *MixConfig) String() string
- func (m *MixConfig) XXX_DiscardUnknown()
- func (m *MixConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MixConfig) XXX_Merge(src proto.Message)
- func (m *MixConfig) XXX_Size() int
- func (m *MixConfig) XXX_Unmarshal(b []byte) error
- type ProviderResponse
- func (*ProviderResponse) Descriptor() ([]byte, []int)
- func (m *ProviderResponse) GetNumberOfPackets() uint64
- func (m *ProviderResponse) GetPackets() [][]byte
- func (*ProviderResponse) ProtoMessage()
- func (m *ProviderResponse) Reset()
- func (m *ProviderResponse) String() string
- func (m *ProviderResponse) XXX_DiscardUnknown()
- func (m *ProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProviderResponse) XXX_Merge(src proto.Message)
- func (m *ProviderResponse) XXX_Size() int
- func (m *ProviderResponse) XXX_Unmarshal(b []byte) error
- type PullRequest
- func (*PullRequest) Descriptor() ([]byte, []int)
- func (m *PullRequest) GetClientPublicKey() []byte
- func (m *PullRequest) GetToken() []byte
- func (*PullRequest) ProtoMessage()
- func (m *PullRequest) Reset()
- func (m *PullRequest) String() string
- func (m *PullRequest) XXX_DiscardUnknown()
- func (m *PullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PullRequest) XXX_Merge(src proto.Message)
- func (m *PullRequest) XXX_Size() int
- func (m *PullRequest) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( DirectoryServerHealthcheckURL = "https://directory.nymtech.net/api/healthcheck" DirectoryServerMetricsURL = "https://directory.nymtech.net/api/metrics/mixes" DirectoryServerPkiURL = "https://directory.nymtech.net/api/nodes" DirectoryServerMixPresenceURL = "https://directory.nymtech.net/api/presence/mixnodes" DirectoryServerMixProviderPresenceURL = "https://directory.nymtech.net/api/presence/mixproviders" DirectoryServerTopology = "https://directory.nymtech.net/api/presence/topology" LocalDirectoryServerMetricsURL = "http://localhost:8080/api/metrics/mixes" LocalDirectoryServerMixPresenceURL = "http://localhost:8080/api/presence/mixnodes" LocalDirectoryServerMixProviderPresenceURL = "http://localhost:8080/api/presence/mixproviders" LocalDirectoryServerTopology = "http://localhost:8080/api/presence/topology" // TODO: somehow split mixConfig to distinguish providers and mixnodes? // But then we would have to deal with nasty interfaces and protobuf issues... ProviderLayer = 1000000 DefaultRemotePort = "1789" )
Variables ¶
This section is empty.
Functions ¶
func WrapWithFlag ¶
func WrapWithFlag(flag flags.PacketTypeFlag, data []byte) ([]byte, error)
WrapWithFlag packs the given byte information together with a specified flag into the packet.
Types ¶
type ClientConfig ¶
type ClientConfig struct { Id string `protobuf:"bytes,1,opt,name=Id,json=id,proto3" json:"Id,omitempty"` Host string `protobuf:"bytes,2,opt,name=Host,json=host,proto3" json:"Host,omitempty"` Port string `protobuf:"bytes,3,opt,name=Port,json=port,proto3" json:"Port,omitempty"` PubKey []byte `protobuf:"bytes,4,opt,name=PubKey,json=pubKey,proto3" json:"PubKey,omitempty"` Provider *MixConfig `protobuf:"bytes,5,opt,name=Provider,json=provider,proto3" json:"Provider,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewClientConfig ¶
func NewClientConfig(clientID, host, port string, pubKey []byte, providerInfo MixConfig) ClientConfig
NewClientConfig constructor
func (*ClientConfig) Descriptor ¶
func (*ClientConfig) Descriptor() ([]byte, []int)
func (*ClientConfig) GetHost ¶
func (m *ClientConfig) GetHost() string
func (*ClientConfig) GetId ¶
func (m *ClientConfig) GetId() string
func (*ClientConfig) GetPort ¶
func (m *ClientConfig) GetPort() string
func (*ClientConfig) GetProvider ¶
func (m *ClientConfig) GetProvider() *MixConfig
func (*ClientConfig) GetPubKey ¶
func (m *ClientConfig) GetPubKey() []byte
func (*ClientConfig) ProtoMessage ¶
func (*ClientConfig) ProtoMessage()
func (*ClientConfig) Reset ¶
func (m *ClientConfig) Reset()
func (*ClientConfig) String ¶
func (m *ClientConfig) String() string
func (*ClientConfig) XXX_DiscardUnknown ¶
func (m *ClientConfig) XXX_DiscardUnknown()
func (*ClientConfig) XXX_Marshal ¶
func (m *ClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientConfig) XXX_Merge ¶
func (m *ClientConfig) XXX_Merge(src proto.Message)
func (*ClientConfig) XXX_Size ¶
func (m *ClientConfig) XXX_Size() int
func (*ClientConfig) XXX_Unmarshal ¶
func (m *ClientConfig) XXX_Unmarshal(b []byte) error
type E2EPath ¶
type E2EPath struct { IngressProvider MixConfig Mixes []MixConfig EgressProvider MixConfig Recipient ClientConfig }
E2EPath holds end to end path data for an entire route, prior to Sphinx header encryption
type GeneralPacket ¶
type GeneralPacket struct { Flag []byte `protobuf:"bytes,1,opt,name=Flag,json=flag,proto3" json:"Flag,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=Data,json=data,proto3" json:"Data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func UnmarshalProviderResponse ¶
func UnmarshalProviderResponse(resp ProviderResponse) ([]GeneralPacket, error)
func (*GeneralPacket) Descriptor ¶
func (*GeneralPacket) Descriptor() ([]byte, []int)
func (*GeneralPacket) GetData ¶
func (m *GeneralPacket) GetData() []byte
func (*GeneralPacket) GetFlag ¶
func (m *GeneralPacket) GetFlag() []byte
func (*GeneralPacket) ProtoMessage ¶
func (*GeneralPacket) ProtoMessage()
func (*GeneralPacket) Reset ¶
func (m *GeneralPacket) Reset()
func (*GeneralPacket) String ¶
func (m *GeneralPacket) String() string
func (*GeneralPacket) XXX_DiscardUnknown ¶
func (m *GeneralPacket) XXX_DiscardUnknown()
func (*GeneralPacket) XXX_Marshal ¶
func (m *GeneralPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GeneralPacket) XXX_Merge ¶
func (m *GeneralPacket) XXX_Merge(src proto.Message)
func (*GeneralPacket) XXX_Size ¶
func (m *GeneralPacket) XXX_Size() int
func (*GeneralPacket) XXX_Unmarshal ¶
func (m *GeneralPacket) XXX_Unmarshal(b []byte) error
type MixConfig ¶
type MixConfig struct { Id string `protobuf:"bytes,1,opt,name=Id,json=id,proto3" json:"Id,omitempty"` Host string `protobuf:"bytes,2,opt,name=Host,json=host,proto3" json:"Host,omitempty"` Port string `protobuf:"bytes,3,opt,name=Port,json=port,proto3" json:"Port,omitempty"` PubKey []byte `protobuf:"bytes,4,opt,name=PubKey,json=pubKey,proto3" json:"PubKey,omitempty"` Layer uint64 `protobuf:"varint,5,opt,name=Layer,json=layer,proto3" json:"Layer,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewMixConfig ¶
NewMixConfig constructor
func (*MixConfig) Descriptor ¶
func (*MixConfig) ProtoMessage ¶
func (*MixConfig) ProtoMessage()
func (*MixConfig) XXX_DiscardUnknown ¶
func (m *MixConfig) XXX_DiscardUnknown()
func (*MixConfig) XXX_Marshal ¶
func (*MixConfig) XXX_Unmarshal ¶
type ProviderResponse ¶
type ProviderResponse struct { NumberOfPackets uint64 `protobuf:"varint,1,opt,name=NumberOfPackets,json=numberOfPackets,proto3" json:"NumberOfPackets,omitempty"` Packets [][]byte `protobuf:"bytes,2,rep,name=Packets,json=packets,proto3" json:"Packets,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ProviderResponse) Descriptor ¶
func (*ProviderResponse) Descriptor() ([]byte, []int)
func (*ProviderResponse) GetNumberOfPackets ¶
func (m *ProviderResponse) GetNumberOfPackets() uint64
func (*ProviderResponse) GetPackets ¶
func (m *ProviderResponse) GetPackets() [][]byte
func (*ProviderResponse) ProtoMessage ¶
func (*ProviderResponse) ProtoMessage()
func (*ProviderResponse) Reset ¶
func (m *ProviderResponse) Reset()
func (*ProviderResponse) String ¶
func (m *ProviderResponse) String() string
func (*ProviderResponse) XXX_DiscardUnknown ¶
func (m *ProviderResponse) XXX_DiscardUnknown()
func (*ProviderResponse) XXX_Marshal ¶
func (m *ProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProviderResponse) XXX_Merge ¶
func (m *ProviderResponse) XXX_Merge(src proto.Message)
func (*ProviderResponse) XXX_Size ¶
func (m *ProviderResponse) XXX_Size() int
func (*ProviderResponse) XXX_Unmarshal ¶
func (m *ProviderResponse) XXX_Unmarshal(b []byte) error
type PullRequest ¶
type PullRequest struct { Token []byte `protobuf:"bytes,1,opt,name=Token,json=token,proto3" json:"Token,omitempty"` ClientPublicKey []byte `protobuf:"bytes,2,opt,name=ClientPublicKey,json=clientPublicKey,proto3" json:"ClientPublicKey,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PullRequest) Descriptor ¶
func (*PullRequest) Descriptor() ([]byte, []int)
func (*PullRequest) GetClientPublicKey ¶
func (m *PullRequest) GetClientPublicKey() []byte
func (*PullRequest) GetToken ¶
func (m *PullRequest) GetToken() []byte
func (*PullRequest) ProtoMessage ¶
func (*PullRequest) ProtoMessage()
func (*PullRequest) Reset ¶
func (m *PullRequest) Reset()
func (*PullRequest) String ¶
func (m *PullRequest) String() string
func (*PullRequest) XXX_DiscardUnknown ¶
func (m *PullRequest) XXX_DiscardUnknown()
func (*PullRequest) XXX_Marshal ¶
func (m *PullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PullRequest) XXX_Merge ¶
func (m *PullRequest) XXX_Merge(src proto.Message)
func (*PullRequest) XXX_Size ¶
func (m *PullRequest) XXX_Size() int
func (*PullRequest) XXX_Unmarshal ¶
func (m *PullRequest) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.