This repository has been archived by the owner on Jan 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dns resolve, use DNS alias instead.
- Loading branch information
Showing
7 changed files
with
104 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,5 @@ build/ | |
.vscode/ | ||
nginx/logs/ | ||
nginx/temp/ | ||
nginx/conf/nginx.conf | ||
.idea/ | ||
Python39/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,5 @@ threads = 200 | |
server = khms1.google.com | ||
|
||
[general] | ||
warning = disabled | ||
warning = enabled | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
worker_processes 8; | ||
|
||
error_log logs/error.log; | ||
error_log logs/error.log notice; | ||
error_log logs/error.log info; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
server_names_hash_bucket_size 64; | ||
|
||
include mime.types; | ||
default_type application/octet-stream; | ||
|
||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name khstorelive.azureedge.net; | ||
|
||
ssl_certificate cert.pem; | ||
ssl_certificate_key key.pem; | ||
|
||
ssl_ciphers HIGH:!aNULL:!MD5; | ||
ssl_prefer_server_ciphers on; | ||
|
||
access_log logs/khstore-access.log; | ||
|
||
location ~* /.*?tsom_cc_activation_masks.* { | ||
return 404; | ||
} | ||
|
||
location ~* /.*?/coverage_maps/.* { | ||
return 404; | ||
} | ||
|
||
location ~* /.*?texture_synthesis_online_map_high_res.* { | ||
return 404; | ||
} | ||
|
||
location ~* /.*?color_corrected_images.* { | ||
return 404; | ||
} | ||
|
||
location / { | ||
proxy_set_header Host khstorelive.azureedge.net; | ||
proxy_pass https://khstorelive.afd.azureedge.net; | ||
proxy_pass_request_headers on; | ||
proxy_ssl_verify off; | ||
} | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name kh.ssl.ak.tiles.virtualearth.net; | ||
|
||
ssl_certificate cert.pem; | ||
ssl_certificate_key key.pem; | ||
|
||
ssl_ciphers HIGH:!aNULL:!MD5; | ||
ssl_prefer_server_ciphers on; | ||
|
||
access_log logs/virtualearth-access.log; | ||
|
||
location /health { | ||
proxy_pass http://localhost:39871/health; | ||
proxy_ssl_verify off; | ||
access_log logs/health-check.log; | ||
} | ||
|
||
location ~* /tiles/akh.*? { | ||
proxy_pass http://localhost:39871; | ||
proxy_pass_request_headers on; | ||
proxy_ssl_verify off; | ||
access_log logs/localgoogle-access.log; | ||
} | ||
|
||
location ~* /tiles/mtx.*? { | ||
proxy_pass http://localhost:39871; | ||
proxy_pass_request_headers on; | ||
proxy_set_header Host kh.ssl.ak.tiles.virtualearth.net; | ||
proxy_ssl_verify off; | ||
access_log logs/localgoogle-access.log; | ||
} | ||
|
||
location / { | ||
proxy_set_header Host kh.ssl.ak.tiles.virtualearth.net; | ||
proxy_pass https://kh.ssl.ak.tiles.virtualearth.net.edgekey.net; | ||
proxy_pass_request_headers on; | ||
proxy_ssl_verify off; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,6 @@ | ||
@setlocal enableextensions | ||
@cd /d "%~dp0" | ||
@echo off | ||
|
||
:: BatchGotAdmin | ||
:------------------------------------- | ||
REM --> Check for permissions | ||
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" ( | ||
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system" | ||
) ELSE ( | ||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" | ||
) | ||
.\Python39\python.exe src\app.py | ||
|
||
REM --> If error flag set, we do not have admin. | ||
if '%errorlevel%' NEQ '0' ( | ||
echo Requesting administrative privileges... | ||
goto UACPrompt | ||
) else ( goto gotAdmin ) | ||
|
||
:UACPrompt | ||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" | ||
set params= %* | ||
echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs" | ||
|
||
"%temp%\getadmin.vbs" | ||
del "%temp%\getadmin.vbs" | ||
exit /B | ||
|
||
:gotAdmin | ||
pushd "%CD%" | ||
CD /D "%~dp0" | ||
:-------------------------------------- | ||
|
||
if exist .\Python39\python.exe ( | ||
echo "Use embedded python" | ||
.\Python39\python.exe src\app.py | ||
) else ( | ||
echo "Use user python" | ||
py -m pip install -r requirements.txt | ||
py src\app.py | ||
) | ||
|
||
pause | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters