Skip to content

Commit ff38fc6

Browse files
committed
v1.5 + warp-cli 2023.3.258 - Belated status Connecting/Connected
1 parent 17affdc commit ff38fc6

14 files changed

+34
-29
lines changed

warpgui/backup/change_endpoint_trd.pas

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ procedure ChangeEndpoint.Execute;
5050
'warp-cli --accept-tos clear-custom-endpoint; ' +
5151
'arr=("500" "4500" "2408"); rand=$[$RANDOM % ${#arr[@]}]; ' +
5252
'warp-cli --accept-tos set-custom-endpoint 162.159.19$((2 + $RANDOM %2)).$((1 + $RANDOM %10)):${arr[$rand]}; '
53-
+ 'warp-cli --accept-tos connect; sleep 2'); { +
54-
'i=0; while [[ -z $(warp-cli --accept-tos status | grep Connected) ]]; do sleep 1; '
55-
+ '((i++)); if [[ $i == 3 ]]; then warp-cli --accept-tos disconnect; break; fi; done');
56-
}
53+
+ 'warp-cli --accept-tos connect; ' +
54+
'i=0; while [[ -z $(ip -br a | grep CloudflareWARP) ]]; do sleep 1; '
55+
+ '((i++)); if [[ $i == 2 ]]; then warp-cli --accept-tos disconnect; break; fi; done');
56+
5757
ChangeProcess.Execute;
5858

5959
finally

warpgui/backup/pingtrd.pas

+4-5
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,17 @@ procedure CheckPing.Execute;
4545
PingProcess.Options := [poUsePipes, poWaitOnExit];
4646
PingProcess.Parameters.Add('-c');
4747

48-
//Проверка длительного зависания на плохом EndPoint (уходим от блокировки, ожидание 2 сек)
48+
4949
{ PingProcess.Parameters.Add(
50-
'i=0; while [[ $(warp-cli --accept-tos status | grep Connecting) ]]; do sleep 1; '
50+
'i=0; while [[ -z $(ip -br a | grep CloudflareWARP) ]]; do sleep 1; '
5151
+ '((i++)); if [[ $i == 3 ]]; then warp-cli --accept-tos disconnect; break; fi; done');
5252
}
53-
PingProcess.Parameters.Add('sleep 0');
54-
53+
// PingProcess.Parameters.Add('sleep 0');
5554

5655
PingProcess.Execute;
5756

5857
//Регистрация (yes/no?)
59-
PingProcess.Parameters.Delete(1);
58+
// PingProcess.Parameters.Delete(1);
6059
PingProcess.Parameters.Add(
6160
'if [[ $(warp-cli --accept-tos status | grep -iE "registration|network|failed|error") ]]; '
6261
+ 'then echo "no"; else echo "yes"; fi');

warpgui/backup/unit1.pas

+3-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ procedure TMainForm.StartBtnClick(Sender: TObject);
117117
if StartBtn.ImageIndex = 0 then
118118
begin
119119
StatusLabel.Caption := ConnectionAttempt;
120-
StartProcess('warp-cli --accept-tos connect; sleep 1;');
120+
StartProcess('warp-cli --accept-tos connect; ' +
121+
'i=0; while [[ -z $(ip -br a | grep CloudflareWARP) ]]; do sleep 1; '
122+
+ '((i++)); if [[ $i == 3 ]]; then warp-cli --accept-tos disconnect; break; fi; done');
121123
end
122124
else
123125
begin

warpgui/backup/warpgui.lps

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
<HasResources Value="True"/>
5050
<ResourceBaseClass Value="Form"/>
5151
<UnitName Value="Unit1"/>
52+
<IsVisibleTab Value="True"/>
5253
<TopLine Value="112"/>
53-
<CursorPos X="48" Y="120"/>
54+
<CursorPos X="30" Y="124"/>
5455
<UsageCount Value="47"/>
5556
<Loaded Value="True"/>
5657
<LoadedDesigner Value="True"/>
@@ -59,10 +60,9 @@
5960
<Filename Value="pingtrd.pas"/>
6061
<IsPartOfProject Value="True"/>
6162
<UnitName Value="PingTRD"/>
62-
<IsVisibleTab Value="True"/>
6363
<EditorIndex Value="1"/>
64-
<TopLine Value="42"/>
65-
<CursorPos Y="54"/>
64+
<TopLine Value="39"/>
65+
<CursorPos X="33" Y="55"/>
6666
<UsageCount Value="46"/>
6767
<Loaded Value="True"/>
6868
</Unit>
@@ -79,7 +79,7 @@
7979
<IsPartOfProject Value="True"/>
8080
<EditorIndex Value="2"/>
8181
<TopLine Value="41"/>
82-
<CursorPos X="41" Y="57"/>
82+
<CursorPos X="19" Y="54"/>
8383
<UsageCount Value="30"/>
8484
<Loaded Value="True"/>
8585
</Unit>
@@ -100,7 +100,7 @@
100100
</Position>
101101
<Position>
102102
<Filename Value="unit1.pas"/>
103-
<Caret Line="120" Column="64" TopLine="49"/>
103+
<Caret Line="120" Column="48" TopLine="112"/>
104104
</Position>
105105
</JumpHistory>
106106
<RunParams>

warpgui/change_endpoint_trd.pas

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ procedure ChangeEndpoint.Execute;
5151
'arr=("500" "4500" "2408"); rand=$[$RANDOM % ${#arr[@]}]; ' +
5252
'warp-cli --accept-tos set-custom-endpoint 162.159.19$((2 + $RANDOM %2)).$((1 + $RANDOM %10)):${arr[$rand]}; '
5353
+ 'warp-cli --accept-tos connect; ' +
54-
'i=0; while [[ -z $(ip -br a | grep CloudflareWARP) ]]; do sleep 1; '
55-
+ '((i++)); if [[ $i == 2 ]]; then warp-cli --accept-tos disconnect; break; fi; done');
54+
'i=0; while [[ -z $(ip -br a | grep CloudflareWARP) ]]; do sleep 1; ' +
55+
'((i++)); if [[ $i == 2 ]]; then warp-cli --accept-tos disconnect; break; fi; done');
5656

5757
ChangeProcess.Execute;
5858

0 Bytes
Binary file not shown.

warpgui/lib/x86_64-linux/pingtrd.o

-320 Bytes
Binary file not shown.

warpgui/lib/x86_64-linux/pingtrd.ppu

0 Bytes
Binary file not shown.

warpgui/lib/x86_64-linux/unit1.o

160 Bytes
Binary file not shown.

warpgui/lib/x86_64-linux/unit1.ppu

0 Bytes
Binary file not shown.

warpgui/pingtrd.pas

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ procedure CheckPing.Execute;
4747

4848
//Проверка длительного зависания на плохом EndPoint (уходим от блокировки, ожидание 2 сек)
4949
{ PingProcess.Parameters.Add(
50-
'i=0; while [[ $(warp-cli --accept-tos status | grep Connecting) ]]; do sleep 1; '
50+
'i=0; while [[ -z $(ip -br a | grep CloudflareWARP) ]]; do sleep 1; '
5151
+ '((i++)); if [[ $i == 3 ]]; then warp-cli --accept-tos disconnect; break; fi; done');
52-
}
52+
5353
PingProcess.Parameters.Add('sleep 0');
5454
55-
PingProcess.Execute;
55+
PingProcess.Execute; }
5656

5757
//Регистрация (yes/no?)
58-
PingProcess.Parameters.Delete(1);
58+
// PingProcess.Parameters.Delete(1);
5959
PingProcess.Parameters.Add(
6060
'if [[ $(warp-cli --accept-tos status | grep -iE "registration|network|failed|error") ]]; '
6161
+ 'then echo "no"; else echo "yes"; fi');

warpgui/unit1.pas

+5-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ procedure TMainForm.StartBtnClick(Sender: TObject);
117117
if StartBtn.ImageIndex = 0 then
118118
begin
119119
StatusLabel.Caption := ConnectionAttempt;
120-
StartProcess('warp-cli --accept-tos connect');
120+
121+
//Проверка длительного зависания на плохом EndPoint (уходим от блокировки, ожидание 2 сек)
122+
StartProcess('warp-cli --accept-tos connect; ' +
123+
'i=0; while [[ -z $(ip -br a | grep CloudflareWARP) ]]; do sleep 1; ' +
124+
'((i++)); if [[ $i == 2 ]]; then warp-cli --accept-tos disconnect; break; fi; done');
121125
end
122126
else
123127
begin

warpgui/warpgui

0 Bytes
Binary file not shown.

warpgui/warpgui.lps

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
<HasResources Value="True"/>
5050
<ResourceBaseClass Value="Form"/>
5151
<UnitName Value="Unit1"/>
52+
<IsVisibleTab Value="True"/>
5253
<TopLine Value="112"/>
53-
<CursorPos X="48" Y="120"/>
54+
<CursorPos X="18" Y="120"/>
5455
<UsageCount Value="47"/>
5556
<Loaded Value="True"/>
5657
<LoadedDesigner Value="True"/>
@@ -60,8 +61,8 @@
6061
<IsPartOfProject Value="True"/>
6162
<UnitName Value="PingTRD"/>
6263
<EditorIndex Value="1"/>
63-
<TopLine Value="42"/>
64-
<CursorPos Y="54"/>
64+
<TopLine Value="39"/>
65+
<CursorPos X="33" Y="55"/>
6566
<UsageCount Value="46"/>
6667
<Loaded Value="True"/>
6768
</Unit>
@@ -76,10 +77,9 @@
7677
<Unit>
7778
<Filename Value="change_endpoint_trd.pas"/>
7879
<IsPartOfProject Value="True"/>
79-
<IsVisibleTab Value="True"/>
8080
<EditorIndex Value="2"/>
8181
<TopLine Value="41"/>
82-
<CursorPos X="41" Y="57"/>
82+
<CursorPos X="78" Y="54"/>
8383
<UsageCount Value="30"/>
8484
<Loaded Value="True"/>
8585
</Unit>
@@ -100,7 +100,7 @@
100100
</Position>
101101
<Position>
102102
<Filename Value="unit1.pas"/>
103-
<Caret Line="120" Column="64" TopLine="49"/>
103+
<Caret Line="120" Column="48" TopLine="112"/>
104104
</Position>
105105
</JumpHistory>
106106
<RunParams>

0 commit comments

Comments
 (0)