MCPcopy Index your code
hub / github.com/coder/coder / ServerTailnet

Struct ServerTailnet

coderd/tailnet.go:168–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168type ServerTailnet struct {
169 ctx context.Context
170 cancel func()
171
172 logger slog.Logger
173 tracer trace.Tracer
174
175 // in prod, these are the same, but coordinatee is a subset of Conn's
176 // methods which makes some tests easier.
177 conn *tailnet.Conn
178 coordinatee tailnet.Coordinatee
179
180 controller *tailnet.Controller
181 coordCtrl *MultiAgentController
182
183 transport *http.Transport
184
185 connsPerAgent *prometheus.GaugeVec
186 totalConns *prometheus.CounterVec
187}
188
189func (s *ServerTailnet) ReverseProxy(targetURL, dashboardURL *url.URL, agentID uuid.UUID, app appurl.ApplicationURL, wildcardHostname string) *httputil.ReverseProxy {
190 // Rewrite the targetURL's Host to point to the agent's IP. This is

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected