mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-13 23:03:09 +00:00
Decode server response in IP detection routine
This commit is contained in:
@@ -234,7 +234,7 @@ def print_tg_info():
|
||||
with urllib.request.urlopen('https://ifconfig.co/ip') as f:
|
||||
if f.status != 200:
|
||||
raise Exception("Invalid status code")
|
||||
my_ip = f.read().strip()
|
||||
my_ip = f.read().decode().strip()
|
||||
except Exception:
|
||||
my_ip = 'YOUR_IP'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user