Skip to content

Commit 1030e66

Browse files
committed
Updated Tor version checking
1 parent cb66e74 commit 1030e66

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 ScriptTiger
3+
Copyright (c) 2024 ScriptTiger
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

src/torpanel/Main.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ public static void main(String[] args) {
116116

117117
// Compare latest version with local version
118118
String responseLine;
119-
Pattern pattern = Pattern.compile("^.*-windows-i686.tar.gz.*$");
119+
Pattern pattern = Pattern.compile("^.*\\s\\(tor\\s.*$");
120120
while ((responseLine = reader.readLine()) != null) {
121121
Matcher matcher = pattern.matcher(responseLine);
122122
if (matcher.matches()) {
123123
String local = version.replaceAll("\\s.*$", "");
124124
String latest = responseLine
125-
.replaceAll("^.*r ", "")
125+
.replaceAll("^.*r\\s", "")
126126
.replaceAll("\\)<.*$", "");
127127
if (!local.equals(latest)) {new popupDialog("Warning", "Your current Tor version is "+local+", but binaries are available for the latest stable version of "+latest+".\n\n"+url.toString(), JOptionPane.WARNING_MESSAGE);}
128128
break;

0 commit comments

Comments
 (0)