From 9efe1e0d1addeab9e0ee0e4a9d88a3ec056d9c4d Mon Sep 17 00:00:00 2001
From: "hinto.janai" <hinto.janai@protonmail.com>
Date: Sat, 3 Jun 2023 11:30:26 -0400
Subject: [PATCH] v1.2.3

---
 CHANGELOG.md                                  | 12 ++++---
 README.md                                     |  2 ++
 src/README.md                                 |  2 +-
 src/constants.rs                              |  4 +--
 src/node.rs                                   |  2 +-
 src/update.rs                                 |  4 +--
 utils/package.sh                              | 34 ++++++++++++++-----
 .../Gupax.app/Contents/Info.plist             |  0
 .../Gupax.app/Contents/MacOS/gupax            |  0
 .../Gupax.app/Contents/MacOS/p2pool/p2pool    |  0
 .../Gupax.app/Contents/MacOS/xmrig/xmrig      |  0
 .../Gupax.app/Contents/Resources/Gupax.icns   |  0
 .../macos-x64/Gupax.app/Contents/Info.plist   |  0
 .../macos-x64/Gupax.app/Contents/MacOS/gupax  |  0
 .../Gupax.app/Contents/MacOS/p2pool/p2pool    |  0
 .../Gupax.app/Contents/MacOS/xmrig/xmrig      |  0
 .../Gupax.app/Contents/Resources/Gupax.icns   |  0
 17 files changed, 42 insertions(+), 18 deletions(-)
 rename utils/skel/{macos => macos-arm64}/Gupax.app/Contents/Info.plist (100%)
 rename utils/skel/{macos => macos-arm64}/Gupax.app/Contents/MacOS/gupax (100%)
 rename utils/skel/{macos => macos-arm64}/Gupax.app/Contents/MacOS/p2pool/p2pool (100%)
 rename utils/skel/{macos => macos-arm64}/Gupax.app/Contents/MacOS/xmrig/xmrig (100%)
 rename utils/skel/{macos => macos-arm64}/Gupax.app/Contents/Resources/Gupax.icns (100%)
 create mode 100755 utils/skel/macos-x64/Gupax.app/Contents/Info.plist
 create mode 100644 utils/skel/macos-x64/Gupax.app/Contents/MacOS/gupax
 create mode 100644 utils/skel/macos-x64/Gupax.app/Contents/MacOS/p2pool/p2pool
 create mode 100644 utils/skel/macos-x64/Gupax.app/Contents/MacOS/xmrig/xmrig
 create mode 100755 utils/skel/macos-x64/Gupax.app/Contents/Resources/Gupax.icns

diff --git a/CHANGELOG.md b/CHANGELOG.md
index dc3622b..e1dd1bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,13 +1,17 @@
 # v1.2.3
 ## Updates
-*
+* Added ARM (Apple Silicon) macOS releases (bundle includes ARM P2Pool/XMRig)
+* [Remote Node](https://github.com/hinto-janai/gupax#remote-monero-nodes) changes:
+	- Added `xmr.support`
+	- Added `xmr.theuplink.net`
 
 ## Fixes
-*
+* Fixed macOS Tor+TLS issue, updates are now via Tor by default ([#28](https://github.com/hinto-janai/gupax/issues/28))
+* Fixed undisplayable ANSI codes in P2Pool's terminal ([#24](https://github.com/hinto-janai/gupax/issues/34))
 
 ## Bundled Versions
-* [`P2Pool v3.3`](https://github.com/SChernykh/p2pool/releases/tag/v3.3)
-* [`XMRig v6.19.2`](https://github.com/xmrig/xmrig/releases/tag/v6.19.2)
+* [`P2Pool v3.4`](https://github.com/SChernykh/p2pool/releases/tag/v3.4)
+* [`XMRig v6.19.3`](https://github.com/xmrig/xmrig/releases/tag/v6.19.3)
 
 
 ---
diff --git a/README.md b/README.md
index a2edf78..62feaf0 100644
--- a/README.md
+++ b/README.md
@@ -581,11 +581,13 @@ These are the remote nodes used by Gupax in the `[P2Pool Simple]` tab. They are
 | xmr.foxpro.su                    | πŸ‡³πŸ‡± NL - North Holland             | 18081    | 18084       |
 | home.allantaylor.kiwi            | πŸ‡³πŸ‡Ώ NZ - Canterbury                | 18089    | 18083       |
 | ru.poiuty.com                    | πŸ‡·πŸ‡Ί RU - Kuzbass                   | 18081    | 18084       |
+| xmr.support                      | πŸ‡ΊπŸ‡Έ US - California                | 18081    | 18083       |
 | radishfields.hopto.org           | πŸ‡ΊπŸ‡Έ US - Colorado                  | 18081    | 18084       |
 | xmrbandwagon.hopto.org           | πŸ‡ΊπŸ‡Έ US - Colorado                  | 18081    | 18084       |
 | xmr.spotlightsound.com           | πŸ‡ΊπŸ‡Έ US - Kansas                    | 18081    | 18084       |
 | xmrnode.facspro.net              | πŸ‡ΊπŸ‡Έ US - Nebraska                  | 18089    | 18084       |
 | node.sethforprivacy.com          | πŸ‡ΊπŸ‡Έ US - New York                  | 18089    | 18083       |
+| xmr.theuplink.net                | πŸ‡ΊπŸ‡Έ US - New York                  | 18081    | 18084       |
 | moneronode.ddns.net              | πŸ‡ΊπŸ‡Έ US - Pennsylvania              | 18089    | 18084       |
 | node.richfowler.net              | πŸ‡ΊπŸ‡Έ US - Pennsylvania              | 18089    | 18084       |
 
diff --git a/src/README.md b/src/README.md
index f7961d4..cf8b53d 100644
--- a/src/README.md
+++ b/src/README.md
@@ -122,7 +122,7 @@ Windows versions of Gupax also need the file to end with `.exe`.
 
 The actual `zip/tar` matching is static, however. They have to be packaged exactly with the following naming scheme. If an exact match is not found, it will error:
 - `gupax-vX.X.X-(windows|macos|linux)-(x64|arm64)-(standalone|bundle).(zip|tar.gz)`
-- `p2pool-vX.X.X-(windows|macos|linux)-(x64|arm64).(zip|tar.gz)`
+- `p2pool-vX.X.X-(windows|macos|linux)-(x64|aarch64).(zip|tar.gz)`
 - `xmrig-X.X.X-(msvc-win64|macos-x64|macos-arm64|linux-static-x64).(zip|tar.gz)`
 
 Exceptions (there are always exceptions...):
diff --git a/src/constants.rs b/src/constants.rs
index e9e0644..79e25bb 100644
--- a/src/constants.rs
+++ b/src/constants.rs
@@ -16,8 +16,8 @@
 // along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 pub const GUPAX_VERSION:  &str = concat!("v", env!("CARGO_PKG_VERSION")); // e.g: v1.0.0
-pub const P2POOL_VERSION: &str = "v3.3";
-pub const XMRIG_VERSION:  &str = "v6.19.2";
+pub const P2POOL_VERSION: &str = "v3.4";
+pub const XMRIG_VERSION:  &str = "v6.19.3";
 pub const COMMIT:         &str = include_str!("../.git/refs/heads/main");
 // e.g: Gupax_v1_0_0
 // Would have been [Gupax_v1.0.0] but P2Pool truncates everything after [.]
diff --git a/src/node.rs b/src/node.rs
index 91c9816..bf95436 100644
--- a/src/node.rs
+++ b/src/node.rs
@@ -34,7 +34,7 @@ use hyper::{
 // Remote Monero Nodes with ZMQ enabled, sourced from: [https://github.com/hinto-janai/monero-nodes]
 // The format is an array of tuples consisting of: (IP, LOCATION, RPC_PORT, ZMQ_PORT)
 
-pub const REMOTE_NODES: [(&str, &str, &str, &str); 24] = [
+pub const REMOTE_NODES: [(&str, &str, &str, &str); 26] = [
 	("monero.10z.com.ar",           "AR - Buenos Aires F.D.",         "18089", "18084"),
 	("monero2.10z.com.ar",          "BR - SΓ£o Paulo",                 "18089", "18083"),
 	("monero1.heitechsoft.com",     "CA - Ontario",                   "18081", "18084"),
diff --git a/src/update.rs b/src/update.rs
index 556131b..0aad9e1 100644
--- a/src/update.rs
+++ b/src/update.rs
@@ -70,7 +70,7 @@ use zip::ZipArchive;
 //---------------------------------------------------------------------------------------------------- Constants
 // Package naming schemes:
 // gupax  | gupax-vX.X.X-(windows|macos|linux)-(x64|arm64)-(standalone|bundle).(zip|tar.gz)
-// p2pool | p2pool-vX.X.X-(windows|macos|linux)-(x64|arm64).(zip|tar.gz)
+// p2pool | p2pool-vX.X.X-(windows|macos|linux)-(x64|aarch64).(zip|tar.gz)
 // xmrig  | xmrig-X.X.X-(msvc-win64|macos-x64|macos-arm64|linux-static-x64).(zip|tar.gz)
 //
 // Download link = PREFIX + Version (found at runtime) + SUFFIX + Version + EXT
@@ -152,7 +152,7 @@ mod impl_platform {
 	pub(super) use super::impl_unix::*;
 
 	pub(super) const GUPAX_EXTENSION: &str = "-macos-arm64-standalone.tar.gz";
-	pub(super) const P2POOL_EXTENSION: &str = "-macos-arm64.tar.gz";
+	pub(super) const P2POOL_EXTENSION: &str = "-macos-aarch64.tar.gz";
 	pub(super) const XMRIG_EXTENSION: &str = "-macos-arm64.tar.gz";
 }
 
diff --git a/utils/package.sh b/utils/package.sh
index 77f22cc..9ca105e 100755
--- a/utils/package.sh
+++ b/utils/package.sh
@@ -45,10 +45,14 @@ OUTPUT=$(cat linux/Gupax.AppImage)
 [[ $OUTPUT = "./gupax" ]]; check "linux/Gupax.AppImage = ./gupax"
 [[ -f linux/p2pool/p2pool ]]; check "linux/p2pool/p2pool"
 [[ -f linux/xmrig/xmrig ]]; check "linux/xmrig/xmrig"
-title "macOS folder check"
-[[ -d macos/Gupax.app ]]; check "macos/Gupax.app"
-[[ -f macos/Gupax.app/Contents/MacOS/p2pool/p2pool ]]; check "macos/p2pool/p2pool"
-[[ -f macos/Gupax.app/Contents/MacOS/xmrig/xmrig ]]; check "macos/xmrig/xmrig"
+title "macOS-x64 folder check"
+[[ -d macos-x64/Gupax.app ]]; check "macos-x64/Gupax.app"
+[[ -f macos-x64/Gupax.app/Contents/MacOS/p2pool/p2pool ]]; check "macos-x64/p2pool/p2pool"
+[[ -f macos-x64/Gupax.app/Contents/MacOS/xmrig/xmrig ]]; check "macos-x64/xmrig/xmrig"
+title "macOS-arm64 folder check"
+[[ -d macos-arm64/Gupax.app ]]; check "macos-arm64/Gupax.app"
+[[ -f macos-arm64/Gupax.app/Contents/MacOS/p2pool/p2pool ]]; check "macos-arm64/p2pool/p2pool"
+[[ -f macos-arm64/Gupax.app/Contents/MacOS/xmrig/xmrig ]]; check "macos-arm64/xmrig/xmrig"
 title "Windows folder check"
 [[ -f windows/Gupax.exe ]]; check "windows/Gupax.exe"
 [[ -f windows/P2Pool/p2pool.exe ]]; check "windows/P2Pool/p2pool.exe"
@@ -74,17 +78,31 @@ tar -czpf "gupax-${NEW_VER}-linux-x64-standalone.tar.gz" "gupax-$NEW_VER-linux-x
 # Remove dir
 rm -r "gupax-$NEW_VER-linux-x64-standalone"; check "rm linux dir"
 
+# x64
 # Tar macOS Bundle
-title "Tar macOS"
-mv macos "gupax-$NEW_VER-macos-x64-bundle"; check "macos -> gupax-$NEW_VER-macos-x64-bundle"
+title "Tar macOS-x64"
+mv macos-x64 "gupax-$NEW_VER-macos-x64-bundle"; check "macos-x64 -> gupax-$NEW_VER-macos-x64-bundle"
 tar -czpf "gupax-${NEW_VER}-macos-x64-bundle.tar.gz" "gupax-$NEW_VER-macos-x64-bundle" --owner=hinto --group=hinto --mtime="$DATE"; check "tar macos-bundle"
 # Tar macOS Standalone
 mv "gupax-$NEW_VER-macos-x64-bundle" "gupax-$NEW_VER-macos-x64-standalone"; check "gupax-$NEW_VER-macos-x64-bundle -> gupax-$NEW_VER-macos-x64-standalone"
 rm -r "gupax-$NEW_VER-macos-x64-standalone/Gupax.app/Contents/MacOS/p2pool"; check "rm gupax-$NEW_VER-macos-x64-standalone/Gupax.app/Contents/MacOS/p2pool"
 rm -r "gupax-$NEW_VER-macos-x64-standalone/Gupax.app/Contents/MacOS/xmrig"; check "rm gupax-$NEW_VER-macos-x64-standalone/Gupax.app/Contents/MacOS/xmrig/xmrig"
-tar -czpf "gupax-${NEW_VER}-macos-x64-standalone.tar.gz" "gupax-$NEW_VER-macos-x64-standalone" --owner=hinto --group=hinto --mtime="$DATE"; check "tar macos-standalone"
+tar -czpf "gupax-${NEW_VER}-macos-x64-standalone.tar.gz" "gupax-$NEW_VER-macos-x64-standalone" --owner=hinto --group=hinto --mtime="$DATE"; check "tar macos-x64-standalone"
 # Remove dir
-rm -r "gupax-$NEW_VER-macos-x64-standalone"; check "rm macos dir"
+rm -r "gupax-$NEW_VER-macos-x64-standalone"; check "rm macos-x64 dir"
+
+# ARM
+# Tar macOS Bundle
+title "Tar macOS-arm64"
+mv macos-arm64 "gupax-$NEW_VER-macos-arm64-bundle"; check "macos-arm64 -> gupax-$NEW_VER-macos-arm64-bundle"
+tar -czpf "gupax-${NEW_VER}-macos-arm64-bundle.tar.gz" "gupax-$NEW_VER-macos-arm64-bundle" --owner=hinto --group=hinto --mtime="$DATE"; check "tar macos-arm64-bundle"
+# Tar macOS Standalone
+mv "gupax-$NEW_VER-macos-arm64-bundle" "gupax-$NEW_VER-macos-arm64-standalone"; check "gupax-$NEW_VER-macos-arm64-bundle -> gupax-$NEW_VER-macos-arm64-standalone"
+rm -r "gupax-$NEW_VER-macos-arm64-standalone/Gupax.app/Contents/MacOS/p2pool"; check "rm gupax-$NEW_VER-macos-arm64-standalone/Gupax.app/Contents/MacOS/p2pool"
+rm -r "gupax-$NEW_VER-macos-arm64-standalone/Gupax.app/Contents/MacOS/xmrig"; check "rm gupax-$NEW_VER-macos-arm64-standalone/Gupax.app/Contents/MacOS/xmrig/xmrig"
+tar -czpf "gupax-${NEW_VER}-macos-arm64-standalone.tar.gz" "gupax-$NEW_VER-macos-arm64-standalone" --owner=hinto --group=hinto --mtime="$DATE"; check "tar macos-arm64-standalone"
+# Remove dir
+rm -r "gupax-$NEW_VER-macos-arm64-standalone"; check "rm macos dir"
 
 # Zip Windows Bundle
 title "Zip Windows"
diff --git a/utils/skel/macos/Gupax.app/Contents/Info.plist b/utils/skel/macos-arm64/Gupax.app/Contents/Info.plist
similarity index 100%
rename from utils/skel/macos/Gupax.app/Contents/Info.plist
rename to utils/skel/macos-arm64/Gupax.app/Contents/Info.plist
diff --git a/utils/skel/macos/Gupax.app/Contents/MacOS/gupax b/utils/skel/macos-arm64/Gupax.app/Contents/MacOS/gupax
similarity index 100%
rename from utils/skel/macos/Gupax.app/Contents/MacOS/gupax
rename to utils/skel/macos-arm64/Gupax.app/Contents/MacOS/gupax
diff --git a/utils/skel/macos/Gupax.app/Contents/MacOS/p2pool/p2pool b/utils/skel/macos-arm64/Gupax.app/Contents/MacOS/p2pool/p2pool
similarity index 100%
rename from utils/skel/macos/Gupax.app/Contents/MacOS/p2pool/p2pool
rename to utils/skel/macos-arm64/Gupax.app/Contents/MacOS/p2pool/p2pool
diff --git a/utils/skel/macos/Gupax.app/Contents/MacOS/xmrig/xmrig b/utils/skel/macos-arm64/Gupax.app/Contents/MacOS/xmrig/xmrig
similarity index 100%
rename from utils/skel/macos/Gupax.app/Contents/MacOS/xmrig/xmrig
rename to utils/skel/macos-arm64/Gupax.app/Contents/MacOS/xmrig/xmrig
diff --git a/utils/skel/macos/Gupax.app/Contents/Resources/Gupax.icns b/utils/skel/macos-arm64/Gupax.app/Contents/Resources/Gupax.icns
similarity index 100%
rename from utils/skel/macos/Gupax.app/Contents/Resources/Gupax.icns
rename to utils/skel/macos-arm64/Gupax.app/Contents/Resources/Gupax.icns
diff --git a/utils/skel/macos-x64/Gupax.app/Contents/Info.plist b/utils/skel/macos-x64/Gupax.app/Contents/Info.plist
new file mode 100755
index 0000000..e69de29
diff --git a/utils/skel/macos-x64/Gupax.app/Contents/MacOS/gupax b/utils/skel/macos-x64/Gupax.app/Contents/MacOS/gupax
new file mode 100644
index 0000000..e69de29
diff --git a/utils/skel/macos-x64/Gupax.app/Contents/MacOS/p2pool/p2pool b/utils/skel/macos-x64/Gupax.app/Contents/MacOS/p2pool/p2pool
new file mode 100644
index 0000000..e69de29
diff --git a/utils/skel/macos-x64/Gupax.app/Contents/MacOS/xmrig/xmrig b/utils/skel/macos-x64/Gupax.app/Contents/MacOS/xmrig/xmrig
new file mode 100644
index 0000000..e69de29
diff --git a/utils/skel/macos-x64/Gupax.app/Contents/Resources/Gupax.icns b/utils/skel/macos-x64/Gupax.app/Contents/Resources/Gupax.icns
new file mode 100755
index 0000000..e69de29