From ebd3340c4113a0f2477fb76405bdf8e3f3236c2d Mon Sep 17 00:00:00 2001 From: SurfboardV2ray <125461738+Surfboardv2ray@users.noreply.github.com> Date: Fri, 8 Nov 2024 03:10:03 -0600 Subject: [PATCH] Update iptest.py --- IPTest/iptest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IPTest/iptest.py b/IPTest/iptest.py index 12dbbcf..198265a 100644 --- a/IPTest/iptest.py +++ b/IPTest/iptest.py @@ -12,12 +12,14 @@ def rename_vmess_address(proxy, new_address): base64_str += '=' * (4 - missing_padding) try: decoded_str = base64.b64decode(base64_str).decode('utf-8') + print("Decoded VMess proxy JSON:", decoded_str) # Debugging proxy_json = json.loads(decoded_str) proxy_json['add'] = new_address proxy_json['ps'] = new_address # Set remarks to new address proxy_counter += 1 encoded_str = base64.b64encode(json.dumps(proxy_json).encode('utf-8')).decode('utf-8') renamed_proxy = 'vmess://' + encoded_str + print("Renamed VMess proxy:", renamed_proxy) # Debugging return renamed_proxy except Exception as e: print("Error processing VMess proxy: ", e) @@ -35,6 +37,7 @@ def rename_vless_address(proxy, new_address): remarks = new_address # Set remarks to new address renamed_proxy = userinfo + '@' + hostinfo + '#' + remarks proxy_counter += 1 + print("Renamed VLess proxy:", renamed_proxy) # Debugging return renamed_proxy except Exception as e: print("Error processing VLess proxy: ", e) @@ -52,6 +55,7 @@ def rename_trojan_address(proxy, new_address): remarks = new_address # Set remarks to new address renamed_proxy = userinfo + '@' + hostinfo + '#' + remarks proxy_counter += 1 + print("Renamed Trojan proxy:", renamed_proxy) # Debugging return renamed_proxy except Exception as e: print("Error processing Trojan proxy: ", e)