diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5ea76c3..fcd88dc 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,10 +4,9 @@
-
+
-
diff --git a/wg_func.py b/wg_func.py
index 1218632..1527833 100755
--- a/wg_func.py
+++ b/wg_func.py
@@ -13,7 +13,7 @@ import requests
''' 1 = 1. Year, 09 = Month of the Year, 2924 = Day and Year of the Year '''
-version = 'v. 1.10.1924'
+version = 'v. 1.10.2024'
path_to_file = Path('/etc/wire_py/wg_py')
path_to_file2 = Path('/etc/wire_py/settings')
@@ -315,7 +315,7 @@ class ImportTunnel:
path_split1 = path_split[-1]
self.a = TunnelActiv.active()
- if 'PrivateKey = ' in read and 'PublicKey = ' in read:
+ if 'PrivateKey = ' in read and 'PublicKey = 'in read and 'Endpoint =' in read:
with open(filepath, 'r') as file:
key = ConToDict.covert_to_dict(file)
pre_key = key[3]
@@ -373,7 +373,7 @@ class ImportTunnel:
check_call(['nmcli', 'con', 'mod', self.a, 'connection.autoconnect', 'no'])
Path.chmod(wg_read, 0o600)
- if 'PrivateKey = ' not in read:
+ if 'PrivateKey = ' and 'Endpoint = ' not in read:
"""img_w, img_i, w_title, w_txt hand over"""
iw = r'/usr/share/icons/wp-icons/64/error.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'