Skip to content

Commit

Permalink
Merge pull request #122 from Gentatsu/separate_launcher
Browse files Browse the repository at this point in the history
Separate launcher batch file so hosts file does not need editing.
  • Loading branch information
zoffline authored May 11, 2021
2 parents ca07ba5 + 6e62bdd commit 1cc313c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ zoffline can be installed on the same machine as Zwift or another local machine.
* Append this line: ``<zoffline ip> us-or-rly101.zwift.com secure.zwift.com cdn.zwift.com launcher.zwift.com``
<br />(Where ``<zoffline ip>`` is the ip address of the machine running zoffline. If
it's running on the same machine as Zwift, use ``127.0.0.1`` as the ip.)
* If you have the helper scripts, open the __ip_address.txt__ file and change it to the zwift server ip. Launch the __launch.bat__ script as admin to start Zwift. This way, if you use the normal Zwift launcher, it'll go to Zwift's servers, and use this as a standalone launcher.

Why: We need to redirect Zwift to use zoffline and convince Windows and Zwift to
accept zoffline's self signed certificates for Zwift's domain names. Feel free
Expand Down
1 change: 1 addition & 0 deletions scripts/ip_address.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
127.0.0.1
20 changes: 20 additions & 0 deletions scripts/launch.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SET hostspath=%windir%\System32\drivers\etc\hosts
SET tmp_host=%windir%\temp\hosts

@ECHO Moving host file to tmp location...

COPY %hostspath% %tmp_host% /y >nul

SET/p ip_address=<%~dp0\ip_address.txt

ECHO .>>%hostspath%
ECHO %ip_address% us-or-rly101.zwift.com secure.zwift.com cdn.zwift.com launcher.zwift.com >> %hostspath%

START /d "C:\Program Files (x86)\Zwift" ZwiftLauncher.exe

PAUSE

@ECHO Moving host file back...

COPY %tmp_host% %hostspath% /y >nul

0 comments on commit 1cc313c

Please sign in to comment.