Skip to content

feat: support wildcard apps over tunnel #4602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2022
Merged

Conversation

deansheather
Copy link
Member

@deansheather deansheather commented Oct 17, 2022

Closes #4517

Added wildcard support to the tunnel server in coder/wgtunnel#2.

If --access-url is undefined, a persistent tunnel URL will be generated for the server. If --wildcard-access-url is also not defined, it will set the wildcard access URL to *--$TUNNEL_HOST i.e. *--abcdef.tunnel.dev. Subdomain-based apps and port-forwarding should work out of the box for tunneled coder deployments.

image

@deansheather deansheather requested a review from coadler October 17, 2022 20:15
}

// Suffixed wildcard access URL.
dflags.WildcardAccessURL.Value = fmt.Sprintf("*--%s", u.Hostname())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this just be one hypen?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

acutaly looks like ti deosnt matter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it doesn't matter on the server side how many hyphens you use, but I used two here so it matches the two hyphens between each app component

@deansheather
Copy link
Member Author

I'm going to merge this even though I'm still making improvements on the tunnel server side to allow for shorter hostnames. Right now, since the tunnel hostname takes up 32 characters users only have 22 characters (excluding the 8 hyphens) for their app name, agent name, workspace name and username.

I'm hoping to reduce the hostname size on tunnels from 32 characters to 13 characters, and looking into whether we can remove the agent name from the URL for named apps if we make app slugs unique per workspace.

@deansheather deansheather merged commit 47cb9ab into main Oct 20, 2022
@deansheather deansheather deleted the dean/tunnel-apps branch October 20, 2022 22:09
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add wildcard app support to tunnel
2 participants