Skip to content

Commit

Permalink
fixed port redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaaoBlues committed Jun 22, 2022
1 parent dbadb7e commit d86a2dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -164,6 +164,7 @@ def move_launcher():
move_launcher()


add_copypasta_port_redirect()

chdir(APP_PATH)

Expand Down
4 changes: 1 addition & 3 deletions util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():

Expand Down

0 comments on commit d86a2dc

Please sign in to comment.