mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 13:18:53 +00:00
cmd/tailscale: funnel wip cleanup and additional test coverage (#9316)
General cleanup and additional test coverage of WIP code. * use enum for serveType * combine instances of ServeConfig access within unset * cleanMountPoint rewritten into cleanURLPath as it only handles URL paths * refactor and test expandProxyTargetDev > **Note** > Behind the `TAILSCALE_USE_WIP_CODE` flag updates #8489 Signed-off-by: Tyler Smalley <tyler@tailscale.com>
This commit is contained in:
21
ipn/serve.go
21
ipn/serve.go
@@ -85,27 +85,6 @@ type FunnelConn struct {
|
||||
Src netip.AddrPort
|
||||
}
|
||||
|
||||
// ServeStreamRequest defines the JSON request body
|
||||
// for the serve stream endpoint
|
||||
type ServeStreamRequest struct {
|
||||
// HostPort is the DNS and port of the tailscale
|
||||
// URL.
|
||||
HostPort HostPort `json:",omitempty"`
|
||||
|
||||
// Source is the user's serve source
|
||||
// as defined in the `tailscale serve`
|
||||
// command such as http://127.0.0.1:3000
|
||||
Source string `json:",omitempty"`
|
||||
|
||||
// MountPoint is the path prefix for
|
||||
// the given HostPort.
|
||||
MountPoint string `json:",omitempty"`
|
||||
|
||||
// Funnel indicates whether the request
|
||||
// is a serve request or a funnel one.
|
||||
Funnel bool `json:",omitempty"`
|
||||
}
|
||||
|
||||
// WebServerConfig describes a web server's configuration.
|
||||
type WebServerConfig struct {
|
||||
Handlers map[string]*HTTPHandler // mountPoint => handler
|
||||
|
Reference in New Issue
Block a user