From d86a2dc43991625fe867c1148a5830e0dcf6afb0 Mon Sep 17 00:00:00 2001 From: ThaaoBlues Date: Wed, 22 Jun 2022 11:57:57 +0200 Subject: [PATCH] fixed port redirect --- launcher.py | 3 ++- util.py | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/launcher.py b/launcher.py index 87a3107..ce80c98 100644 --- a/launcher.py +++ b/launcher.py @@ -7,7 +7,7 @@ from zipfile import ZipFile from os import path, chdir, remove,mkdir,environ import sys -from util import add_copypasta_to_hosts_file, create_shortcut, is_hosts_file_modified, notify_desktop +from util import add_copypasta_port_redirect, add_copypasta_to_hosts_file, create_shortcut, is_hosts_file_modified, notify_desktop # to fix pyinstaller error import pywintypes @@ -164,6 +164,7 @@ def move_launcher(): move_launcher() + add_copypasta_port_redirect() chdir(APP_PATH) diff --git a/util.py b/util.py index d2ea135..b763684 100644 --- a/util.py +++ b/util.py @@ -282,9 +282,7 @@ def add_copypasta_to_hosts_file(): # flush dns cache run("ipconfig /flushdns",shell=True) - # add port redirect from 127.0.0.1:80 to 127.0.0.1:21987 - run("netsh interface portproxy add v4tov4 listenport=80 listenaddress=127.0.0.1 connectport=21987 connectaddress=127.0.0.1") - + add_copypasta_port_redirect() def get_server_version():