Introduction#
I have had a problem with Tailscale in the Windows environment where Tailscale gets stuck logging in when Clash Meta is started with the system proxy, and it also reports an error in terminal mode.
fetching latest tailscale version: Get "https://pkgs.tailscale.com/stable/?mode=json&os=windows": read tcp 192.168.3.5:9594->199.38.181.239:443: wsarecv: An existing connection was forcibly closed by the remote host.
However, it works normally in TUN mode.
Solution#
I looked up the Tailscale documentation, which states that you can customize Environment variables, and the method is quite simple.
- Create a tailscaled-env.txt file in the Tailscale program directory (C:\ProgramData\Tailscale).
- In the tailscaled-env.txt file, you can set environment variables. For example, change the default UDP listening port.
https_proxy=http://127.0.0.1:7897
http_proxy=http://127.0.0.1:7897
all_proxy=socks5://127.0.0.1:7897
- Save the file and run
net stop Tailscale
,net start Tailscale
to apply the changes.
Other Issues#
I don't know if it will affect hole punching, but it works for me so far. If you have a better solution, feel free to point it out.