| 166 | } |
| 167 | |
| 168 | type 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 | |
| 189 | func (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 |
nothing calls this directly
no outgoing calls
no test coverage detected