mirror of
https://github.com/SillyTavern/SillyTavern-Launcher.git
synced 2026-01-26 17:09:44 +00:00
added auto tailscale url gen to the home menu
only appears if the user has tailscale installed
This commit is contained in:
19
Launcher.bat
19
Launcher.bat
@@ -377,6 +377,25 @@ if %errorlevel% neq 0 (
|
||||
echo [ %green_fg_strong%OK%reset% ] Found app command: %cyan_fg_strong%"winget"%reset% from app: "App Installer"
|
||||
)
|
||||
|
||||
REM Check if Tailscale is installed; if not, then install it
|
||||
tailscale version > nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Tailscale not found, this is optional.
|
||||
) else (
|
||||
echo [ %green_fg_strong%OK%reset% ] Found install: %cyan_fg_strong%"Tailscale"%reset%
|
||||
powershell -command ^
|
||||
"$json = tailscale status --json | ConvertFrom-Json; " ^
|
||||
"$self = $json.Self; " ^
|
||||
"$ip4 = $self.TailscaleIPs[0]; " ^
|
||||
"$hostName = $self.HostName; " ^
|
||||
"$dnsName = $self.DNSName; " ^
|
||||
"$logPath = '%~dp0\bin\logs\tailscale_status.txt'; " ^
|
||||
"Out-File -FilePath $logPath -InputObject $ip4 -Encoding ascii; " ^
|
||||
"Out-File -FilePath $logPath -InputObject $hostName -Append -Encoding ascii; " ^
|
||||
"Out-File -FilePath $logPath -InputObject $dnsName -Append -Encoding ascii"
|
||||
)
|
||||
|
||||
|
||||
|
||||
REM Get the current PATH value from the registry
|
||||
for /f "tokens=2*" %%A in ('reg query "HKCU\Environment" /v PATH') do set "current_path=%%B"
|
||||
|
||||
@@ -35,7 +35,8 @@ if /i "%tailscale_account%"=="Y" (
|
||||
|
||||
if %errorlevel%==0 (
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Tailscale installed successfully.%reset%
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Restart the launcher and go to Toolbox / Editor / Core Utilities / View Tailscale Configuration to see your Tailscale Remote SillyTavern URLS.
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Restart the launcher, your Tailscale Remote SillyTavern URLS should appear on the home menu.
|
||||
echo If they don't appear, go to Toolbox / Editor / Core Utilities / View Tailscale Configuration.
|
||||
echo Press any key to restart the launcher
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Restarting launcher...%reset%
|
||||
timeout /t 10
|
||||
|
||||
Reference in New Issue
Block a user