Skip to content

Commit 3348301

Browse files
committed
Hotfix zip mapping and Xray core release URL
1 parent 00c830b commit 3348301

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

v2ray2proxy/base.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,15 @@ def _download_executables(self):
118118
elif machine == "x86" or machine == "i386":
119119
download_file = "Xray-windows-32.zip"
120120
elif "arm" in machine:
121-
download_file = "Xray-windows-arm32-v7a.zip"
121+
if "64" in machine or "v8" in machine:
122+
download_file = "Xray-windows-arm64-v8a.zip"
123+
else:
124+
download_file = "Xray-windows-arm32-v7a.zip"
122125

123126
# Linux mapping
124127
elif system == "linux":
125128
if machine == "x86_64" or machine == "amd64":
126-
download_file = "c-linux-64.zip"
129+
download_file = "Xray-linux-64.zip"
127130
elif machine == "i386" or machine == "x86":
128131
download_file = "Xray-linux-32.zip"
129132
elif "arm" in machine:
@@ -155,24 +158,39 @@ def _download_executables(self):
155158
download_file = "Xray-linux-s390x.zip"
156159
elif "riscv64" in machine:
157160
download_file = "Xray-linux-riscv64.zip"
161+
elif "loong64" in machine:
162+
download_file = "Xray-linux-loong64.zip"
158163

159164
# macOS mapping
160165
elif system == "darwin":
161-
download_file = "Xray-macos-64.zip"
166+
if "arm" in machine or "aarch64" in machine:
167+
download_file = "Xray-macos-arm64-v8a.zip"
168+
else:
169+
download_file = "Xray-macos-64.zip"
162170

163171
# FreeBSD mapping
164172
elif system == "freebsd":
165173
if machine == "amd64" or machine == "x86_64":
166174
download_file = "Xray-freebsd-64.zip"
167175
elif machine == "i386" or machine == "x86":
168176
download_file = "Xray-freebsd-32.zip"
177+
elif "arm" in machine:
178+
if "64" in machine or "v8" in machine:
179+
download_file = "Xray-freebsd-arm64-v8a.zip"
180+
elif "v7" in machine:
181+
download_file = "Xray-freebsd-arm32-v7a.zip"
169182

170183
# OpenBSD mapping
171184
elif system == "openbsd":
172185
if machine == "amd64" or machine == "x86_64":
173186
download_file = "Xray-openbsd-64.zip"
174187
elif machine == "i386" or machine == "x86":
175188
download_file = "Xray-openbsd-32.zip"
189+
elif "arm" in machine:
190+
if "64" in machine or "v8" in machine:
191+
download_file = "Xray-openbsd-arm64-v8a.zip"
192+
elif "v7" in machine:
193+
download_file = "Xray-openbsd-arm32-v7a.zip"
176194

177195
# Dragonfly mapping
178196
elif system == "dragonfly":

0 commit comments

Comments
 (0)