Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionFromPacketConn ¶ added in v2.1.0
type Dns ¶ added in v2.1.0
type Dns struct { streams.Connection // Address is the parsed representation of the address and calculated automatically while unmarshalling Address addr.ProtoAddress }
Dns will create a client which will establish a SocketAce connection via DNS request-response loop. This is not the fastest nor the most optimal way to establish connections. It is, however, the only way to do it in some cases. You won't be able to stream movies, but this should be sufficient to connect to a remote terminal session, check your email and do some light browsing.
DNS connections are a bit more complex as a lot of probing needs to be done before the connection is established. The steps to establish a DNS connection are as follows: - Try connecting directly via TCP to our target host (if direct connection is allowed). Failing that, - Try connecting directly via UDP to our target host. Failing that, - Use user supplied DNS servers, if they are available. And finally, - Use the system provided DNS servers
type Http ¶
type Http struct { streams.Connection // Address is the parsed representation of the address and calculated automatically while unmarshalling Address addr.ProtoAddress }
Http will establish a connection with the server over HTTP
type InputOutput ¶
type InputOutput struct { streams.Connection // Address is the parsed representation of the address and calculated automatically while unmarshalling Address addr.ProtoAddress Input io.ReadCloser Output io.WriteCloser }
InputOutput is a connection which connects via standard input / output to the server
func (*InputOutput) Connect ¶
func (ups *InputOutput) Connect(manager cert.TlsConfig, mustSecure bool) error
func (*InputOutput) String ¶
func (ups *InputOutput) String() string
type Packet ¶ added in v2.1.0
type Packet struct { streams.Connection // Address is the parsed representation of the address and calculated automatically while unmarshalling Address addr.ProtoAddress }
Socket connects to the server via a socket connection
func (*Packet) Connect ¶ added in v2.1.0
Connect will create a stream over packet connection and use the DefaultCreateConnection to do so.
func (*Packet) ConnectPacket ¶ added in v2.1.0
func (ups *Packet) ConnectPacket(manager cert.TlsConfig, mustSecure bool, connectFunc ConnectionFromPacketConn) error
ConnectPacket will create a stream over a packet connection. It will take the supplied connectFunc to actually "cast" the packet connection into a net.Conn. This is to allow pluggable mechanism of underlying packet translation service.
type Socket ¶
type Socket struct { streams.Connection // Address is the parsed representation of the address and calculated automatically while unmarshalling Address addr.ProtoAddress }
Socket connects to the server via a socket connection
type Upstream ¶
type Upstream interface { streams.Connection Connect(manager cert.TlsConfig, mustSecure bool) error }
Upstream adds the Connect method to connect to the upstream
type Upstreams ¶
type Upstreams struct { Data []Upstream MustSecure bool // If MustSecure is true, non-secured sessions are not tolerated // contains filtered or unexported fields }
Upstreams is a list of upstream servers
func (*Upstreams) Connect ¶
func (ul *Upstreams) Connect(config cert.ConfigGetter, subProtocol string) (streams.ReadWriteCloserClosed, error)
Connect will return a mutex stream to the first upstream available. If an upstream connection is already opened, it will be reused -- only one physical connection will be opened against the server, no matter how many logical connections you start.
func (*Upstreams) Shutdown ¶
func (ul *Upstreams) Shutdown()
Shutdown will close the connection to the connected upstream server