almeidapaulopt / tsdproxy

Tailscale Docker Proxy
MIT License
406 stars 16 forks source link

HTTP to HTTPS redirection not working on phone browsers #28

Open eduardmerino opened 2 weeks ago

eduardmerino commented 2 weeks ago

Description

I'm experiencing an issue where the HTTP to HTTPS redirection is not functioning on mobile browsers. This works fine on desktop browsers, but it fails to redirect correctly when accessing any of my sites using my iPhone.

Steps to Reproduce

  1. Open a phone browser.
  2. Navigate to http://yourdomain.funnyname.ts.net.
  3. The page does not redirect to https://yourdomain.funnyname.ts.net as expected and it shows ERR_CONNECTION_FAILED.
  4. If I write https:// manually in front of the address it works.

Additional Information

Any insights or assistance with this would be appreciated!

simonhammes commented 2 weeks ago

This can also be reproduced by using curl:

curl -I http://nginx.***.ts.net
curl: (7) Failed to connect to nginx.***.ts.net port 80 after 17 ms: Couldn't connect to server

The HTTPS redirect is probably done by your browser (Firefox also does this for me on Debian).

EDIT: Related: https://github.com/tailscale/tailscale/issues/11330