diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 76eb921..ea242ae 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,7 @@
-
+
@@ -227,7 +227,15 @@
1724576599289
-
+
+
+ 1724593165879
+
+
+
+ 1724593165879
+
+
@@ -271,6 +279,7 @@
-
+
+
\ No newline at end of file
diff --git a/main.py b/main.py
index 35cd409..9927f9f 100755
--- a/main.py
+++ b/main.py
@@ -138,7 +138,7 @@ class FrameWidgets(ttk.Frame):
self.btn_tr = tk.Button(self, image=self.tr_pic, bd=0, command=delete)
self.btn_tr.grid(column=0, row=3, padx=15, pady=15)
# Button Export
- self.btn_exp = tk.Button(self, image=self.exp_pic, bd=0)
+ self.btn_exp = tk.Button(self, image=self.exp_pic, bd=0, command=ExportTunnels.wg_export)
self.btn_exp.grid(column=0, row=4, padx=15, pady=15)
# Check Buttons
self.wg_autostart = tk.Checkbutton(self, text='Autoconnect on PC Start')
diff --git a/wg_func.py b/wg_func.py
index 8762e91..c595d9e 100755
--- a/wg_func.py
+++ b/wg_func.py
@@ -1,6 +1,7 @@
# Wireguard functions for Wire-Py
import os
import shutil
+import tarfile
from tkinter import filedialog
import tkinter as tk
@@ -225,8 +226,8 @@ class ExportTunnels:
@staticmethod
def wg_export():
try:
- wg_exp = os.popen('nmcli con show | grep -iPo "(.*)(wireguard)"').read().split()
- wg_exp = wg_exp[1]
- return wg_exp
- except IndexError:
+ wg_tar = os.environ['HOME'] + '/datetime'
+ p_to_conf = os.environ['HOME'] + '/tester'
+ shutil.make_archive(wg_tar, 'zip', p_to_conf)
+ except TypeError:
pass