Documentation
¶
Index ¶
- Constants
- func NewInboundInstance(tcpConn io.ReadWriteCloser, peer *SshPeer, inbound *Inbound)
- func ParseTag(tag string) (port int, host, name, phase string, err error)
- type Inbound
- type Inbounds
- type Outbound
- type Outbounds
- type SID
- type SshPeer
- func (peer *SshPeer) AddInbound(inbound *Inbound)
- func (peer *SshPeer) AddInbounds(inbounds Inbounds)
- func (peer *SshPeer) AddOutbound(outbound *Outbound)
- func (peer *SshPeer) AddOutbounds(outbounds Outbounds)
- func (peer *SshPeer) AddTags(inbounds Inbounds, outbounds Outbounds)
- func (peer *SshPeer) Close(who string)
- func (peer *SshPeer) IsUpgraded() bool
- func (peer *SshPeer) Ready()
- func (peer *SshPeer) Upgrade()
- func (peer *SshPeer) Wait()
Constants ¶
View Source
const ( PP_SID = "pp-sid/" PP_PRIVATE_KEY = PP_SID + "privateKey" ATTESTATION = "Attestation" KUBERNETES = "Kubernetes" KUBERNETES_PHASE = "KUBERNETES_PHASE" ATTESTATION_PHASE = "ATTESTATION_PHASE" BOTH_PHASES = "BOTH_PHASES" PHASE = "Phase" UPGRADE = "Upgrade" )
Variables ¶
This section is empty.
Functions ¶
func NewInboundInstance ¶
func NewInboundInstance(tcpConn io.ReadWriteCloser, peer *SshPeer, inbound *Inbound)
func ParseTag ¶
ParseTag() parses an inbound or outbound tag Outbound tags with structure <Phase>:<Name>:<Port>
are interperted to approach 127.0.0.1:<Port>
Outbound tags with structure <Phase>:<Name>:<Host>:<Port>
are interperted to approach <Host>:<Port>
Inbound tags with structure <Phase>:<Name>:<Port>
are interperted to serve 127.0.0.1:<Port> on host network namespace
Inbound tags with structure <Phase>:<Name>:<Namespace>:<Port>
are interperted to serve 127.0.0.1:<Port> on <Namespace> network namepsace
Types ¶
type Inbound ¶
type Inbound struct {
// tcp peers
Name string
TcpListener *net.TCPListener
Connections chan *net.Conn
Phase string // ATTESTATION_PHASE, KUBERNETES_PHASE, BOTH_PHASES
}
Inbound side of the Tunnel - incoming tcp connections from local clients
type Inbounds ¶
type Inbounds struct {
// contains filtered or unexported fields
}
type SshPeer ¶
type SshPeer struct {
// contains filtered or unexported fields
}
func NewSshPeer ¶
func NewSshPeer(ctx context.Context, phase string, sshConn ssh.Conn, chans <-chan ssh.NewChannel, sshReqs <-chan *ssh.Request, sid string) *SshPeer
NewSshPeer
func (*SshPeer) AddInbound ¶
NewInbound create an Inbound and listen to incoming client connections
func (*SshPeer) AddInbounds ¶
NewOutbound create an outbound and connect to an outgoing server
func (*SshPeer) AddOutbound ¶
NewOutbound create an outbound and connect to an outgoing server
func (*SshPeer) AddOutbounds ¶
NewOutbound create an outbound and connect to an outgoing server
func (*SshPeer) IsUpgraded ¶
Click to show internal directories.
Click to hide internal directories.