@echo off
setlocal
cd /d "%~dp0"
title Proxies.sx Peer

REM ==============================================================
REM  STEP 1: paste your API key between the quotes below.
REM  Get it at client.proxies.sx/account  ->  API Keys
REM ==============================================================
set "API_KEY=psx_PASTE_YOUR_KEY_HERE"

REM A stable, unique device name per machine (keep the %COMPUTERNAME% formula).
set "AGENT_NAME=%COMPUTERNAME%"
set "CONNECTION_METHOD=windows"

if "%API_KEY%"=="psx_PASTE_YOUR_KEY_HERE" (
  echo.
  echo  [!] Open start.bat in Notepad and paste your API key first, then save and run again.
  echo.
  pause
  exit /b 1
)

:loop
echo.
echo [%date% %time%] Starting Proxies.sx peer as "%AGENT_NAME%" ...
proxies-peer.exe
echo.
echo [%date% %time%] Peer stopped. Restarting in 10s.  Close this window to stop sharing.
timeout /t 10 /nobreak >/dev/null
goto loop
