mitm/build.bat

29 lines
645 B
Batchfile

@echo off
REM Set console to UTF-8 encoding to prevent garbled text on Chinese Windows systems
chcp 65001 >nul 2>&1
echo Building MITM Proxy Server...
REM Download dependencies
echo Downloading dependencies...
go mod download
REM Build program
echo Building executable...
go build -o mitm.exe .
if %ERRORLEVEL% EQU 0 (
echo.
echo Build successful!
echo Executable: mitm.exe
echo.
echo Usage:
echo 1. Ensure cert.p12 and CA.crt files exist
echo 2. Edit config.toml configuration file
echo 3. Run mitm.exe as administrator
echo.
) else (
echo.
echo Build failed! Please check error messages.
)
pause