ipn/ipnserver: remove protoSwitchConn shenanigans; just use http.Server early

Now that everything's just HTTP, there's no longer a need to have a
header-sniffing net.Conn wraper that dispatches which route to
take. Refactor to just use an http.Server earlier instead.

Updates #6417

Change-Id: I12a2054db4e56f48660c46f81233db224fdc77cb
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-11-25 20:54:37 -08:00
committed by Brad Fitzpatrick
parent e567902aa9
commit b0545873e5
4 changed files with 142 additions and 164 deletions
+2 -8
View File
@@ -4,14 +4,8 @@
package ipnserver
import (
"bufio"
"context"
"net"
import "net/http"
"tailscale.com/types/logger"
)
func (s *Server) handleProxyConnectConn(ctx context.Context, br *bufio.Reader, c net.Conn, logf logger.Logf) {
func (s *Server) handleProxyConnectConn(w http.ResponseWriter, r *http.Request) {
panic("unreachable")
}