docs: http-lp forwarding goes over the agent's WebSocket, by long polls only without one - said so in the panel, the code and the README
This commit is contained in:
1 parent
e93a2bbd3a
commit
e8d45f2f7b
7 files changed
+22
-15
No files matched your search
@@ -12,8 +12,9 @@ import (
|
||||
|
||||
// forwardManager owns the host-side listeners for port-forward rules. It
|
||||
// supports three transports:
|
||||
// - "http": tunneled over the HTTP long-poll channel (works anywhere nginx
|
||||
// reaches, highest latency);
|
||||
// - "http": over the agent's own link to the panel - its WebSocket, or the
|
||||
// HTTP long polls while there is none (works anywhere nginx reaches,
|
||||
// highest latency);
|
||||
// - "tcp": direct TCP multiplexed over the tunnel port (low latency);
|
||||
// - "udp": direct UDP over the tunnel port.
|
||||
type forwardManager struct {
|
||||
@@ -103,7 +104,8 @@ func (m *forwardManager) bridgeDirect(rule ForwardRule, conn net.Conn) {
|
||||
at.openStream(rule.ClientPort, conn)
|
||||
}
|
||||
|
||||
// bridgeHTTP wires a connection through the HTTP long-poll hub session.
|
||||
// bridgeHTTP wires a connection through a hub session: the agent carries it
|
||||
// over its WebSocket, or by long polls while it has none.
|
||||
func (m *forwardManager) bridgeHTTP(rule ForwardRule, conn net.Conn) {
|
||||
sess := m.hub.CreateForward(rule.AgentID, rule.ClientPort)
|
||||
defer m.hub.CloseSession(sess.ID)
|
||||
|
||||
Reference in new issue
Block a user