diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 6c172c0..65b4c32 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,11 +4,11 @@
-
+
-
+
-
+
@@ -42,23 +42,23 @@
- {
+ "keyToString": {
+ "ASKED_ADD_EXTERNAL_FILES": "true",
+ "Python.INSTALL.executor": "Run",
+ "Python.install.executor": "Run",
+ "Python.main.executor": "Run",
+ "Python.messagebox.executor": "Run",
+ "Python.start_wg.executor": "Run",
+ "Python.wg_func.executor": "Run",
+ "Python.wg_main.executor": "Run",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "Shell Script.install.executor": "Run",
+ "git-widget-placeholder": "main",
+ "last_opened_file_path": "/home/punix/Pyapps/wire-py",
+ "settings.editor.selected.configurable": "preferences.fileTypes"
}
-}]]>
+}
@@ -439,7 +439,15 @@
1726764877546
-
+
+
+ 1726770649542
+
+
+
+ 1726770649542
+
+
@@ -480,7 +488,6 @@
-
@@ -505,6 +512,7 @@
-
+
+
\ No newline at end of file
diff --git a/Wire-Py.desktop b/Wire-Py.desktop
index 293408b..19e5690 100755
--- a/Wire-Py.desktop
+++ b/Wire-Py.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=Wire-Py
-Exec=/usr/bin/wirepy
+Exec=/usr/bin/wirepy.py
Terminal=false
Categories=Network;
Icon=/usr/share/icons/wp-icons/128/wg_vpn.png
diff --git a/wg_func.py b/wg_func.py
index 78aaace..1d6e700 100755
--- a/wg_func.py
+++ b/wg_func.py
@@ -9,7 +9,7 @@ from subprocess import check_call
font_color = '#4011a7'
path_to_file = Path('/etc/wire_py/wg_py')
-
+_u = Path.read_text(Path('/tmp/_u'))
def msg_window():
msg = tk.Toplevel()
@@ -181,7 +181,7 @@ class ImportTunnel:
def wg_import_select(self):
try:
- filepath = filedialog.askopenfilename(initialdir='/home/', title='Select Wireguard config File',
+ filepath = filedialog.askopenfilename(initialdir=str(_u), title='Select Wireguard config File',
filetypes=[('WG config files', '*.conf')],)
with open(filepath, 'r') as file:
@@ -293,13 +293,13 @@ class OnOff:
class ExportTunnels:
@staticmethod
def wg_export():
- _u = Path.read_text(Path('/tmp/_u'))
+
now_time = datetime.now()
now_datetime = now_time.strftime('wg-exp-' + '%m-%d-%Y' + '-' + '%H:%M')
tl = ListTunnels.tl_list()
try:
if len(tl) != 0:
- wg_tar = '/home/' + str(_u) + now_datetime
+ wg_tar = str(_u) + '/' + now_datetime
p_to_conf = Path('/etc/wire_py/')
shutil.make_archive(wg_tar, 'zip', p_to_conf)
#if zip_full != 0:
diff --git a/wirepy.py b/wirepy.py
index bb3d616..592fa67 100755
--- a/wirepy.py
+++ b/wirepy.py
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/python3
from subprocess import check_call
from pathlib import Path