Function
proxyConnection
(c *stdcli.Context, cn net.Conn, rack sdk.Interface, remotehost string, remoteport int, secure bool)
Source from the content-addressed store, hash-verified
| 113 | } |
| 114 | |
| 115 | func proxyConnection(c *stdcli.Context, cn net.Conn, rack sdk.Interface, remotehost string, remoteport int, secure bool) { |
| 116 | defer cn.Close() |
| 117 | |
| 118 | opts := structs.ProxyOptions{ |
| 119 | TLS: options.Bool(secure), |
| 120 | } |
| 121 | |
| 122 | if err := rack.WithContext(c.Context).Proxy(remotehost, remoteport, cn, opts); err != nil { |
| 123 | c.Error(err) |
| 124 | } |
| 125 | } |
Tested by
no test coverage detected