fix https setting

This commit is contained in:
SpikeHD 2022-04-24 16:22:23 -07:00
parent f4bfb34f47
commit 854e1b2242
4 changed files with 10 additions and 7 deletions

View File

@ -53,6 +53,8 @@ class MlgmXyysd_Anime_Game_Proxy:
REMOTE_HOST = ctx.options.ip REMOTE_HOST = ctx.options.ip
REMOTE_PORT = ctx.options.port REMOTE_PORT = ctx.options.port
print(ctx.options.use_https)
LIST_DOMAINS = [ LIST_DOMAINS = [
"api-os-takumi.mihoyo.com", "api-os-takumi.mihoyo.com",
"hk4e-api-os-static.mihoyo.com", "hk4e-api-os-static.mihoyo.com",

View File

@ -399,7 +399,7 @@ async function launchPrivate() {
Neutralino.storage.setData('config', JSON.stringify(config)) Neutralino.storage.setData('config', JSON.stringify(config))
// Pass IP and game folder to the private server launcher // Pass IP and game folder to the private server launcher
Neutralino.os.execCommand(`${NL_CWD}/scripts/private_server_launch.cmd ${ip} ${port} "${config.gamefolder}/${await getGameExecName()}" "${NL_CWD}" ${config.enableKillswitch}`).catch(e => console.log(e)) Neutralino.os.execCommand(`${NL_CWD}/scripts/private_server_launch.cmd ${ip} ${port} ${config.useHttps} "${config.gamefolder}/${await getGameExecName()}" "${NL_CWD}" ${config.enableKillswitch}`).catch(e => console.log(e))
} }
async function launchLocalServer() { async function launchLocalServer() {

View File

@ -72,7 +72,7 @@ async function handleLanguageChange(elm) {
/** /**
* Toggle the use of HTTPS * Toggle the use of HTTPS
*/ */
async function toggleKillSwitch() { async function toggleHttps() {
const httpsCheckbox = document.querySelector('#httpsOption') const httpsCheckbox = document.querySelector('#httpsOption')
const config = await getCfg() const config = await getCfg()

View File

@ -3,7 +3,7 @@
:: Ensure admin :: Ensure admin
>nul 2>&1 reg query "HKU\S-1-5-19" || ( >nul 2>&1 reg query "HKU\S-1-5-19" || (
set params = %*:"="""% set params = %*:"="""%
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %1 %2 "%3" ""%cd%"" %5", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B ) cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %1 %2 %3 "%4" ""%cd%"" %6", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
) )
:: Use to force task kill :: Use to force task kill
@ -13,11 +13,12 @@ echo Starting Proxy Server
set IP=%1 set IP=%1
set PORT=%2 set PORT=%2
set GAME_PATH=%3 set USE_HTTPS=%3
set GAME_PATH=%4
set GAME_PATH=%GAME_PATH:"=% set GAME_PATH=%GAME_PATH:"=%
set ORIGIN=%4 set ORIGIN=%5
set ORIGIN=%ORIGIN:"=% set ORIGIN=%ORIGIN:"=%
set ENABLE_KILLSWITCH=%5 set ENABLE_KILLSWITCH=%6
set PROXY=true set PROXY=true
@rem Store original proxy settings @rem Store original proxy settings
@ -29,7 +30,7 @@ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v Pr
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "127.0.0.1:8080" /f >nul 2>nul reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "127.0.0.1:8080" /f >nul 2>nul
:: Start proxy server :: Start proxy server
start "Proxy Server" %ORIGIN%/ext/mitmdump.exe -s "%ORIGIN%/proxy/proxy.py" --ssl-insecure --set ip=%IP% --set port=%PORT% start "Proxy Server" %ORIGIN%/ext/mitmdump.exe -s "%ORIGIN%/proxy/proxy.py" --ssl-insecure --set ip=%IP% --set port=%PORT% --set use_https=%USE_HTTPS%
echo Opening %GAME_PATH% echo Opening %GAME_PATH%