34 lines
773 B
Batchfile
34 lines
773 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...
|
|
set GOEXPERIMENT="nodwarf5"
|
|
set PATH='C:\TDM-GCC-64\bin';%PATH%
|
|
set CGO_ENABLED="1"
|
|
set GOOS="windows"
|
|
set GOARCH="amd64"
|
|
go build -v -a -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 |