Skip to content
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

Invalid 'target' when TAILSCALE_SERVE_MODE=tls-terminated-tcp #16

Open
Kiser360 opened this issue Dec 12, 2023 · 3 comments
Open

Invalid 'target' when TAILSCALE_SERVE_MODE=tls-terminated-tcp #16

Kiser360 opened this issue Dec 12, 2023 · 3 comments

Comments

@Kiser360
Copy link

Scenario
Trying to follow the blog article's docker-compose.yml snippet for code-server. I've made no changes except filling in the secrets.

Problem
error: failed to apply TCP serve: unable to expand target: must be a URL starting with one of the supported schemes: [tcp]

Research
This commit suggests Tailscale 1.52.0 made some CLI changes. Looking at the docs it suggests that when using --tls-terminated-tcp specifying a 'target' with http:// might be invalid. The docs even say that the protocol can be omitted.

Problem
This line will always specify http:// regardless of TAILSCALE_SERVE_MODE.

Solution: Perhaps omit the protocol from the tailscale serve command?

Can't validate the solution and do the pull myself, but I didn't want the research to go to waste.

@Kiser360
Copy link
Author

Kiser360 commented Dec 12, 2023

I did some of the work to investigate the fix:

  1. Start services, but we expect a failure : docker compose up -d

  2. Shell into the docker container: docker compose exec -it <container-name> bash

  3. Modify the docker mod : nano /etc/s6-overlay/s6-rc.d/svc-tailscale-up/run

  4. Change the line mentioned in the top post, remove the protocol from the target
    http://localhost:"${TAILSCALE_SERVE_PORT} -> localhost:"${TAILSCALE_SERVE_PORT}

  5. Restart services : docker compose restart

This fix works for TAILSCALE_SERVE_MODE=tls-terminated-tcp. I have not tested for any other modes

@stevesbrain
Copy link

Can confirm this also works for me, and fits with the fact they changed the serve + funnel logic. Would have been nice if they updated their mods at the same time :P

@alexfornuto
Copy link

I hate to add what's essentially noise to an issue thread, but since there's no upstream response I thought a little noise might be warranted.

The very first service I wanted to test this mod with was Quassel, and IRC client. Thus my attempt was met with a known error. Please review this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants