Skip to content

Commit 45a2e6f

Browse files
committed
Housekeeping
1 parent 7cf3af9 commit 45a2e6f

5 files changed

Lines changed: 22 additions & 47 deletions

File tree

src/cli/v2ray.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
# Platform-conditional imports
1616
if sys.platform == 'win32':
17+
import threading
1718
import psutil
1819
import netifaces
1920
import json
@@ -26,7 +27,7 @@
2627
import psutil
2728
from typedef.konstants import ConfParams
2829
import threading
29-
import threading
30+
3031

3132
# ---------------------------------------------------------------------------
3233
# V2RayHandler – one class per platform, selected at the bottom of this

src/cli/wallet.py

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ def connect(self,
12701270
return
12711271

12721272
else: # v2ray
1273-
if pltfrm == Arch.OSX:
1273+
if pltfrm in [Arch.OSX, Arch.WINDOWS]:
12741274
chdir(MeileConfig.BASEBINDIR)
12751275
conndesc.write("Bringing up V2Ray socks tunnel...\n")
12761276
conndesc.flush()
@@ -1299,30 +1299,13 @@ def connect(self,
12991299
chdir(MeileConfig.BASEDIR)
13001300
return
13011301

1302-
'''
1303-
if pltfrm != Arch.OSX:
1304-
for iface in psutil.net_if_addrs().keys():
1305-
if "tun" in iface:
1306-
tuniface = True
1307-
break
1308-
else:
1309-
if psutil.net_if_addrs().get("utun123"):
1310-
self.connected = {"v2ray_pid" : v2ray_handler.v2ray_pid,
1311-
"result": True,
1312-
"status" : "utun123",
1313-
"session_id" : session_id}
1314-
print(self.connected)
1315-
tuniface = True
1316-
'''
1317-
13181302
tuniface = wait_for_tunnel_iface(iface=["tun", "utun3", "utun123"], timeout=30)
13191303

1320-
13211304
if tuniface is not None:
13221305
print("Tunnel interface is up:", tuniface)
13231306
conndesc.write("Checking network connection...\n")
13241307
conndesc.flush()
1325-
sleep(3.3)
1308+
sleep(5.3)
13261309
if self.get_ip_address():
13271310
self.connected = {"v2ray_pid" : v2ray_handler.v2ray_pid,
13281311
"result": True,
@@ -1335,7 +1318,7 @@ def connect(self,
13351318
"session_id" : session_id}
13361319
sleep(1)
13371320
conndesc.close()
1338-
if pltfrm == Arch.OSX:
1321+
if pltfrm in [Arch.OSX, Arch.WINDOWS]:
13391322
chdir(MeileConfig.BASEDIR)
13401323
return
13411324
else:
@@ -1353,10 +1336,10 @@ def connect(self,
13531336
"status": f"Error connecting to v2ray node: {tuniface}",
13541337
"session_id" : session_id}
13551338
print(self.connected)
1356-
if pltfrm == Arch.OSX:
1339+
if pltfrm in [Arch.OSX, Arch.WINDOWS]:
13571340
chdir(MeileConfig.BASEDIR)
13581341
return
1359-
if pltfrm == Arch.OSX:
1342+
if pltfrm in [Arch.OSX, Arch.WINDOWS]:
13601343
chdir(MeileConfig.BASEDIR)
13611344
self.connected = {"v2ray_pid" : None,
13621345
"result": False,

src/typedef/konstants.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,8 @@ class IBCTokens():
613613
#mu_coins = ["tsent", "udvpn", "uscrt", "uosmo", "uatom", "udec"]
614614
class TextStrings():
615615
dash = "-"
616-
VERSION = "v2.5.5"
617-
BUILD = "17748518213"
616+
VERSION = "v2.6.0"
617+
BUILD = "1779933081642"
618618
RootTag = "SENTINEL"
619619
GITHUB_API_URL = "https://api.github.com/repos/MathNodes/meile-gui/releases/latest"
620620
DOWNLOAD_URL = "https://meile.app"
@@ -953,6 +953,16 @@ class NodeKeys():
953953

954954

955955

956+
957+
958+
959+
960+
961+
962+
963+
964+
965+
956966

957967

958968

src/ui/screens.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2379,7 +2379,7 @@ def build_plans(self, data, plans, no_of_nodes, no_of_countries):
23792379
plan_name=data['plan_name'],
23802380
num_of_nodes=str(no_of_nodes),
23812381
num_of_countries=str(no_of_countries),
2382-
ost=str(plancost) + data['plan_denom'].replace('dvpn', ' p2p') + f"[color=fcb711] ${plancost_usd}[/color]",
2382+
cost=str(plancost) + data['plan_denom'].replace('dvpn', ' p2p') + f"[color=fcb711] ${plancost_usd}[/color]",
23832383
logo_image=data['logo'],
23842384
uuid=data['uuid'],
23852385
id=str(plan['subscription_id']) if plan else str(0),

src/ui/widgets.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ def check_balance(conf: int):
19131913
check_balance(1)
19141914
if self.zaddress_balance >= arrr:
19151915
self.invoice_result = {"success" : True, "id": self.zaddress_balance }
1916-
'''
1916+
19171917
def check_invoice_status_firo(self, address=False, invoice=False, firo=0):
19181918
Request = HTTPRequests.MakeRequest(TIMEOUT=120)
19191919
http = Request.hadapter()
@@ -2193,20 +2193,6 @@ def call_on_success_subscription(self, dt):
21932193
if self.on_success_subscription_payg:
21942194
self.on_success_subscription_payg()
21952195

2196-
'''
2197-
2198-
def reparse_coin_deposit(self, deposit):
2199-
for k,v in CoinsList.ibc_coins.items():
2200-
try:
2201-
coin = re.findall(k,deposit)[0]
2202-
deposit = deposit.replace(coin, v)
2203-
mu_deposit_amt = int(float(re.findall(r'[0-9]+\.[0-9]+', deposit)[0])*CoinsList.SATOSHI)
2204-
tru_mu_deposit = str(mu_deposit_amt) + v
2205-
return tru_mu_deposit
2206-
except:
2207-
pass
2208-
'''
2209-
22102196
def closeDialog(self, inst):
22112197
self.dialog.dismiss()
22122198
self.dialog = None
@@ -2393,12 +2379,7 @@ def get_state(self) -> str:
23932379
"""Returns the state of panel. Can be `close` or `open` ."""
23942380

23952381
return self._state
2396-
'''
2397-
def add_widget(self, widget, index=0, canvas=None):
2398-
if isinstance(widget, NodeDetails):
2399-
self.height = widget.height
2400-
return super().add_widget(widget)
2401-
'''
2382+
24022383
def add_widget(self, widget, index=0, canvas=None):
24032384
# Don't override height here — let the animation handle it
24042385
return super().add_widget(widget, index=index, canvas=canvas)

0 commit comments

Comments
 (0)