1
+ #! /bin/bash
2
+
3
+ # Colors
4
+ red=' \033[0;31m'
5
+ green=' \033[0;32m'
6
+ yellow=' \033[0;33m'
7
+ blue=' \033[0;34m'
8
+ purple=' \033[0;35m'
9
+ cyan=' \033[0;36m'
10
+ rest=' \033[0m'
11
+
12
+ # Check Dependencies build
13
+ check_dependencies_build () {
14
+ local dependencies=(" curl" " wget" " git" " golang" )
15
+
16
+ for dep in " ${dependencies[@]} " ; do
17
+ if ! dpkg -s " ${dep} " & > /dev/null; then
18
+ echo -e " ${yellow}${dep} is not installed. Installing...${rest} "
19
+ pkg install " ${dep} " -y
20
+ fi
21
+ done
22
+ }
23
+
24
+ # Check Dependencies
25
+ check_dependencies () {
26
+ local dependencies=(" curl" " openssl-tool" " wget" " unzip" )
27
+
28
+ for dep in " ${dependencies[@]} " ; do
29
+ if ! dpkg -s " ${dep} " & > /dev/null; then
30
+ echo -e " ${yellow}${dep} is not installed. Installing...${rest} "
31
+ pkg install " ${dep} " -y
32
+ fi
33
+ done
34
+ }
35
+
36
+ # Install
37
+ install () {
38
+ if command -v warp & > /dev/null || command -v usef & > /dev/null; then
39
+ echo -e " ${green} Warp is already installed.${rest} "
40
+ return
41
+ fi
42
+
43
+ echo -e " ${purple} *********************************${rest} "
44
+ echo -e " ${green} Installing Warp...${rest} "
45
+ pkg update -y && pkg upgrade -y
46
+ pacman -Syu openssh = apt update; apt full-upgrade -y; apt install -y openssh
47
+ check_dependencies
48
+
49
+ if wget https://github.com/bepass-org/warp-plus/releases/download/v1.1.0/warp-plus-android-arm64.cdb551.zip &&
50
+ unzip warp-plus-android-arm64.cdb551.zip &&
51
+ mv warp-plus warp &&
52
+ chmod +x warp &&
53
+ cp warp " $PREFIX /bin/usef" &&
54
+ cp warp " $PREFIX /bin/warp-plus" &&
55
+ cp warp " $PREFIX /bin/warp" ; then
56
+ rm " README.md" " LICENSE" " warp-plus-android-arm64.cdb551.zip"
57
+ echo " ================================================"
58
+ echo -e " ${green} Warp installed successfully.${rest} "
59
+ socks
60
+ else
61
+ echo -e " ${red} Error installing Warp.${rest} "
62
+ fi
63
+ }
64
+
65
+ # Install arm
66
+ install_arm () {
67
+ if command -v warp & > /dev/null || command -v usef & > /dev/null; then
68
+ echo -e " ${green} Warp is already installed.${rest} "
69
+ return
70
+ fi
71
+
72
+ echo -e " ${purple} *********************************${rest} "
73
+ echo -e " ${green} Installing Warp...${rest} "
74
+ pkg update -y && pkg upgrade -y
75
+ pacman -Syu openssh = apt update; apt full-upgrade -y; apt install -y openssh
76
+ check_dependencies
77
+
78
+ # Determine architecture
79
+ case " $( dpkg --print-architecture) " in
80
+ i386) ARCH=" 386" ;;
81
+ amd64) ARCH=" amd64" ;;
82
+ armhf) ARCH=" arm5" ;;
83
+ arm) ARCH=" arm7" ;;
84
+ aarch64) ARCH=" arm64" ;;
85
+ * ) echo -e " ${red} Unsupported architecture.${rest} " ; return ;;
86
+ esac
87
+
88
+ WARP_URL=" https://github.com/bepass-org/warp-plus/releases/download/v1.1.0/warp-plus-linux-$ARCH .cdb551.zip"
89
+
90
+ if wget " $WARP_URL " &&
91
+ unzip " warp-plus-linux-$ARCH .cdb551.zip" &&
92
+ mv warp-plus warp &&
93
+ chmod +x warp &&
94
+ cp warp " $PREFIX /bin/usef" &&
95
+ cp warp " $PREFIX /bin/warp-plus" &&
96
+ cp warp " $PREFIX /bin/warp" ; then
97
+ rm " README.md" " LICENSE" " warp-plus-linux-$ARCH .cdb551.zip"
98
+ echo -e " ${blue} ================================================${rest} "
99
+ echo -e " ${blue} ================================================${rest} "
100
+ echo -e " ${green} Warp installed successfully.${rest} "
101
+ socks
102
+ else
103
+ echo -e " ${red} Error installing Warp.${rest} "
104
+ fi
105
+ }
106
+
107
+ # Get socks config
108
+ socks () {
109
+ echo " "
110
+ echo -e " ${yellow} Copy this Config to ${purple} V2ray${green} Or ${purple} Nekobox ${yellow} and Exclude Termux${rest} "
111
+ echo " "
112
+ echo -e " ${green} socks://Og==@127.0.0.1:8086#warp_(usef)${rest} "
113
+ echo " or"
114
+ echo -e " ${green} Manually create a SOCKS configuration with IP ${purple} 127.0.0.1 ${green} and port${purple} 8086..${rest} "
115
+ echo -e " ${blue} ================================================${rest} "
116
+ echo -e " ${yellow} To run again, type:${green} warp ${rest} or${green} usef ${rest} or${green} ./warp ${rest} or${green} warp-plus ${rest} "
117
+ echo -e " ${blue} ================================================${rest} "
118
+ echo -e " ${green} If you get a 'Bad address' error, run ${yellow} [Arm]${rest} "
119
+ echo -e " ${blue} ================================================${rest} "
120
+ echo -e " ${blue} ================================================${rest} "
121
+ echo " "
122
+ }
123
+
124
+ # Gool (warp in warp)
125
+ gool () {
126
+ if ! command -v warp & > /dev/null || ! command -v usef & > /dev/null; then
127
+ echo -e " ${purple} *********************************${rest} "
128
+ echo -e " ${green} Please install Warp first.${rest} "
129
+ return
130
+ fi
131
+ echo -e " ${purple} *********************************${rest} "
132
+ echo -e " ${green} This option changes your current location to the nearest and best location.${rest} "
133
+ echo -e " ${purple} *********************************${rest} "
134
+ warp --gool
135
+ }
136
+
137
+ # Psiphon
138
+ psiphon_location () {
139
+ if ! command -v warp & > /dev/null || ! command -v usef & > /dev/null; then
140
+ echo -e " ${purple} *********************************${rest} "
141
+ echo -e " ${green} Please install Warp first.${rest} "
142
+ return
143
+ fi
144
+ echo -e " ${purple} *********************************${rest} "
145
+ echo -e " ${cyan} Please choose a location from the list below by entering its number:${rest} "
146
+ echo " "
147
+ echo -e " ${purple} 1)${yellow} Austria (AT)${rest} "
148
+ echo -e " ${purple} 2)${yellow} Belgium (BE)${rest} "
149
+ echo -e " ${purple} 3)${yellow} Bulgaria (BG)${rest} "
150
+ echo -e " ${purple} 4)${yellow} Brazil (BR)${rest} "
151
+ echo -e " ${purple} 5)${yellow} Canada (CA)${rest} "
152
+ echo -e " ${purple} 6)${yellow} Switzerland (CH)${rest} "
153
+ echo -e " ${purple} 7)${yellow} Czech Republic (CZ)${rest} "
154
+ echo -e " ${purple} 8)${yellow} Germany (DE)${rest} "
155
+ echo -e " ${purple} 9)${yellow} Denmark (DK)${rest} "
156
+ echo -e " ${purple} 10)${yellow} Estonia (EE)${rest} "
157
+ echo -e " ${purple} 11)${yellow} Spain (ES)${rest} "
158
+ echo -e " ${purple} 12)${yellow} Finland (FI)${rest} "
159
+ echo -e " ${purple} 13)${yellow} France (FR)${rest} "
160
+ echo -e " ${purple} 14)${yellow} United Kingdom (GB)${rest} "
161
+ echo -e " ${purple} 15)${yellow} Hungary (HU)${rest} "
162
+ echo -e " ${purple} 16)${yellow} Ireland (IE)${rest} "
163
+ echo -e " ${purple} 17)${yellow} India (IN)${rest} "
164
+ echo -e " ${purple} 18)${yellow} Italy (IT)${rest} "
165
+ echo -e " ${purple} 19)${yellow} Japan (JP)${rest} "
166
+ echo -e " ${purple} 20)${yellow} Latvia (LV)${rest} "
167
+ echo -e " ${purple} 21)${yellow} Netherlands (NL)${rest} "
168
+ echo -e " ${purple} 22)${yellow} Norway (NO)${rest} "
169
+ echo -e " ${purple} 23)${yellow} Poland (PL)${rest} "
170
+ echo -e " ${purple} 24)${yellow} Romania (RO)${rest} "
171
+ echo -e " ${purple} 25)${yellow} Serbia (RS)${rest} "
172
+ echo -e " ${purple} 26)${yellow} Sweden (SE)${rest} "
173
+ echo -e " ${purple} 27)${yellow} Singapore (SG)${rest} "
174
+ echo -e " ${purple} 28)${yellow} Slovakia (SK)${rest} "
175
+ echo -e " ${purple} 29)${yellow} Ukraine (UA)${rest} "
176
+ echo -e " ${purple} 30)${yellow} United States (US)${rest} "
177
+ echo " "
178
+
179
+ echo -en " ${green} Enter the ${yellow} number${green} of the location [${yellow} default: 1${green} ]: ${rest} "
180
+ read -r choice
181
+ choice=${choice:- 1}
182
+
183
+ case " $choice " in
184
+ 1) location=" AT" ;;
185
+ 2) location=" BE" ;;
186
+ 3) location=" BG" ;;
187
+ 4) location=" BR" ;;
188
+ 5) location=" CA" ;;
189
+ 6) location=" CH" ;;
190
+ 7) location=" CZ" ;;
191
+ 8) location=" DE" ;;
192
+ 9) location=" DK" ;;
193
+ 10) location=" EE" ;;
194
+ 11) location=" ES" ;;
195
+ 12) location=" FI" ;;
196
+ 13) location=" FR" ;;
197
+ 14) location=" GB" ;;
198
+ 15) location=" HU" ;;
199
+ 16) location=" IE" ;;
200
+ 17) location=" IN" ;;
201
+ 18) location=" IT" ;;
202
+ 19) location=" JP" ;;
203
+ 20) location=" LV" ;;
204
+ 21) location=" NL" ;;
205
+ 22) location=" NO" ;;
206
+ 23) location=" PL" ;;
207
+ 24) location=" RO" ;;
208
+ 25) location=" RS" ;;
209
+ 26) location=" SE" ;;
210
+ 27) location=" SG" ;;
211
+ 28) location=" SK" ;;
212
+ 29) location=" UA" ;;
213
+ 30) location=" US" ;;
214
+ * ) echo " Invalid choice. Please select a valid location number." ;;
215
+ esac
216
+
217
+ # Now use the selected location variable $location in your script
218
+ echo -e " ${purple} *********************************${rest} "
219
+ echo -e " ${green} Selected location: $location ${rest} "
220
+ echo -e " ${blue} *********************************${rest} "
221
+ warp --cfon --country $location
222
+ }
223
+
224
+ # Uninstall
225
+ uninstall () {
226
+ warp=" $PREFIX /bin/warp"
227
+ directory=" /data/data/com.termux/files/home/warp-plus"
228
+ home=" /data/data/com.termux/files/home"
229
+ if [ -f " $warp " ]; then
230
+ rm -rf " $directory " " $PREFIX /bin/usef" " wa.py" " $PREFIX /bin/warp" " $PREFIX /bin/warp-plus" " warp" " stuff" > /dev/null 2>&1
231
+ echo -e " ${purple} *********************************${rest} "
232
+ echo -e " ${red} Uninstallation completed.${rest} "
233
+ echo -e " ${purple} *********************************${rest} "
234
+ else
235
+ echo -e " ${yellow} ____________________________________${rest} "
236
+ echo -e " ${red} Not installed.Please Install First.${rest}${yellow} |"
237
+ echo -e " ${yellow} ____________________________________${rest} "
238
+ fi
239
+ }
240
+
241
+ # Warp to Warp plus
242
+ warp_plus () {
243
+ if ! command -v python & > /dev/null; then
244
+ echo " Installing Python..."
245
+ pkg install python -y
246
+ fi
247
+
248
+ echo -e " ${green} Downloading and running${purple} Warp+ script...${rest} "
249
+ wget -O wa.py https://raw.githubusercontent.com/Ptechgithub/configs/main/wa.py
250
+ python wa.py
251
+ }
252
+
253
+ # Menu
254
+ menu () {
255
+ clear
256
+ echo -e " ${green} By --> Peyman * Github.com/Ptechgithub * ${rest} "
257
+ echo " "
258
+ echo -e " ${yellow} ❤️Github.com/${cyan} bepass-org${yellow} /warp-plus❤️${rest} "
259
+ echo -e " ${purple} *********************************${rest} "
260
+ echo -e " ${blue} ###${cyan} Warp-Plus in Termux ${blue} ###${rest} ${purple} * ${rest} "
261
+ echo -e " ${purple} *********************************${rest} "
262
+ echo -e " ${cyan} 1]${rest} ${green} Install Warp (vpn)${purple} * ${rest} "
263
+ echo -e " ${purple} * ${rest} "
264
+ echo -e " ${cyan} 2]${rest} ${green} Install Warp (vpn) [${yellow} Arm${green} ] ${purple} * ${rest} "
265
+ echo -e " ${purple} * ${rest} "
266
+ echo -e " ${cyan} 3]${rest} ${green} Uninstall${rest}${purple} * ${rest} "
267
+ echo -e " ${purple} * ${rest} "
268
+ echo -e " ${cyan} 4]${rest} ${green} Gool [${yellow} warp in warp${green} ]${purple} * ${rest} "
269
+ echo -e " ${purple} * ${rest} "
270
+ echo -e " ${cyan} 5]${rest} ${green} Psiphon [${yellow} + All Locations${green} ]${purple} * ${rest} "
271
+ echo -e " ${purple} * ${rest} "
272
+ echo -e " ${cyan} 6]${rest} ${green} Warp to ${purple} Warp plus${green} [${yellow} Free GB${green} ]${rest}${purple} * ${rest} "
273
+ echo -e " ${purple} * ${rest} "
274
+ echo -e " ${red} 0]${rest} ${green} Exit ${purple} * ${rest} "
275
+ echo -e " ${purple} *********************************${rest} "
276
+ }
277
+
278
+ # Main
279
+ menu
280
+ echo -en " ${cyan} Please enter your selection [${yellow} 0-6${green} ]:${rest} "
281
+ read -r choice
282
+
283
+ case " $choice " in
284
+ 1)
285
+ install
286
+ warp
287
+ ;;
288
+ 2)
289
+ install_arm
290
+ warp
291
+ ;;
292
+ 3)
293
+ uninstall
294
+ ;;
295
+ 4)
296
+ gool
297
+ ;;
298
+ 5)
299
+ psiphon_location
300
+ ;;
301
+ 6)
302
+ warp_plus
303
+ ;;
304
+ 0)
305
+ echo -e " ${purple} *********************************${rest} "
306
+ echo -e " ${cyan} By 🖐${rest} "
307
+ exit
308
+ ;;
309
+ * )
310
+ echo -e " ${purple} *********************************${rest} "
311
+ echo -e " ${red} Invalid choice. Please select a valid option.${rest} "
312
+ echo -e " ${purple} *********************************${rest} "
313
+ ;;
314
+ esac
0 commit comments