File tree 14 files changed +34
-29
lines changed
14 files changed +34
-29
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,10 @@ procedure ChangeEndpoint.Execute;
50
50
' warp-cli --accept-tos clear-custom-endpoint; ' +
51
51
' arr=("500" "4500" "2408"); rand=$[$RANDOM % ${#arr[@]}]; ' +
52
52
' 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
+
57
57
ChangeProcess.Execute;
58
58
59
59
finally
Original file line number Diff line number Diff line change @@ -45,18 +45,17 @@ procedure CheckPing.Execute;
45
45
PingProcess.Options := [poUsePipes, poWaitOnExit];
46
46
PingProcess.Parameters.Add(' -c' );
47
47
48
- // Проверка длительного зависания на плохом EndPoint (уходим от блокировки, ожидание 2 сек)
48
+
49
49
{ 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; '
51
51
+ '((i++)); if [[ $i == 3 ]]; then warp-cli --accept-tos disconnect; break; fi; done');
52
52
}
53
- PingProcess.Parameters.Add(' sleep 0' );
54
-
53
+ // PingProcess.Parameters.Add('sleep 0');
55
54
56
55
PingProcess.Execute;
57
56
58
57
// Регистрация (yes/no?)
59
- PingProcess.Parameters.Delete(1 );
58
+ // PingProcess.Parameters.Delete(1);
60
59
PingProcess.Parameters.Add(
61
60
' if [[ $(warp-cli --accept-tos status | grep -iE "registration|network|failed|error") ]]; '
62
61
+ ' then echo "no"; else echo "yes"; fi' );
Original file line number Diff line number Diff line change @@ -117,7 +117,9 @@ procedure TMainForm.StartBtnClick(Sender: TObject);
117
117
if StartBtn.ImageIndex = 0 then
118
118
begin
119
119
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' );
121
123
end
122
124
else
123
125
begin
Original file line number Diff line number Diff line change 49
49
<HasResources Value =" True" />
50
50
<ResourceBaseClass Value =" Form" />
51
51
<UnitName Value =" Unit1" />
52
+ <IsVisibleTab Value =" True" />
52
53
<TopLine Value =" 112" />
53
- <CursorPos X =" 48 " Y =" 120 " />
54
+ <CursorPos X =" 30 " Y =" 124 " />
54
55
<UsageCount Value =" 47" />
55
56
<Loaded Value =" True" />
56
57
<LoadedDesigner Value =" True" />
59
60
<Filename Value =" pingtrd.pas" />
60
61
<IsPartOfProject Value =" True" />
61
62
<UnitName Value =" PingTRD" />
62
- <IsVisibleTab Value =" True" />
63
63
<EditorIndex Value =" 1" />
64
- <TopLine Value =" 42 " />
65
- <CursorPos Y =" 54 " />
64
+ <TopLine Value =" 39 " />
65
+ <CursorPos X = " 33 " Y =" 55 " />
66
66
<UsageCount Value =" 46" />
67
67
<Loaded Value =" True" />
68
68
</Unit >
79
79
<IsPartOfProject Value =" True" />
80
80
<EditorIndex Value =" 2" />
81
81
<TopLine Value =" 41" />
82
- <CursorPos X =" 41 " Y =" 57 " />
82
+ <CursorPos X =" 19 " Y =" 54 " />
83
83
<UsageCount Value =" 30" />
84
84
<Loaded Value =" True" />
85
85
</Unit >
100
100
</Position >
101
101
<Position >
102
102
<Filename Value =" unit1.pas" />
103
- <Caret Line =" 120" Column =" 64 " TopLine =" 49 " />
103
+ <Caret Line =" 120" Column =" 48 " TopLine =" 112 " />
104
104
</Position >
105
105
</JumpHistory >
106
106
<RunParams >
Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ procedure ChangeEndpoint.Execute;
51
51
' arr=("500" "4500" "2408"); rand=$[$RANDOM % ${#arr[@]}]; ' +
52
52
' warp-cli --accept-tos set-custom-endpoint 162.159.19$((2 + $RANDOM %2)).$((1 + $RANDOM %10)):${arr[$rand]}; '
53
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' );
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
56
57
57
ChangeProcess.Execute;
58
58
Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ procedure CheckPing.Execute;
47
47
48
48
// Проверка длительного зависания на плохом EndPoint (уходим от блокировки, ожидание 2 сек)
49
49
{ 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; '
51
51
+ '((i++)); if [[ $i == 3 ]]; then warp-cli --accept-tos disconnect; break; fi; done');
52
- }
52
+
53
53
PingProcess.Parameters.Add('sleep 0');
54
54
55
- PingProcess.Execute;
55
+ PingProcess.Execute; }
56
56
57
57
// Регистрация (yes/no?)
58
- PingProcess.Parameters.Delete(1 );
58
+ // PingProcess.Parameters.Delete(1);
59
59
PingProcess.Parameters.Add(
60
60
' if [[ $(warp-cli --accept-tos status | grep -iE "registration|network|failed|error") ]]; '
61
61
+ ' then echo "no"; else echo "yes"; fi' );
Original file line number Diff line number Diff line change @@ -117,7 +117,11 @@ procedure TMainForm.StartBtnClick(Sender: TObject);
117
117
if StartBtn.ImageIndex = 0 then
118
118
begin
119
119
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' );
121
125
end
122
126
else
123
127
begin
Original file line number Diff line number Diff line change 49
49
<HasResources Value =" True" />
50
50
<ResourceBaseClass Value =" Form" />
51
51
<UnitName Value =" Unit1" />
52
+ <IsVisibleTab Value =" True" />
52
53
<TopLine Value =" 112" />
53
- <CursorPos X =" 48 " Y =" 120" />
54
+ <CursorPos X =" 18 " Y =" 120" />
54
55
<UsageCount Value =" 47" />
55
56
<Loaded Value =" True" />
56
57
<LoadedDesigner Value =" True" />
60
61
<IsPartOfProject Value =" True" />
61
62
<UnitName Value =" PingTRD" />
62
63
<EditorIndex Value =" 1" />
63
- <TopLine Value =" 42 " />
64
- <CursorPos Y =" 54 " />
64
+ <TopLine Value =" 39 " />
65
+ <CursorPos X = " 33 " Y =" 55 " />
65
66
<UsageCount Value =" 46" />
66
67
<Loaded Value =" True" />
67
68
</Unit >
76
77
<Unit >
77
78
<Filename Value =" change_endpoint_trd.pas" />
78
79
<IsPartOfProject Value =" True" />
79
- <IsVisibleTab Value =" True" />
80
80
<EditorIndex Value =" 2" />
81
81
<TopLine Value =" 41" />
82
- <CursorPos X =" 41 " Y =" 57 " />
82
+ <CursorPos X =" 78 " Y =" 54 " />
83
83
<UsageCount Value =" 30" />
84
84
<Loaded Value =" True" />
85
85
</Unit >
100
100
</Position >
101
101
<Position >
102
102
<Filename Value =" unit1.pas" />
103
- <Caret Line =" 120" Column =" 64 " TopLine =" 49 " />
103
+ <Caret Line =" 120" Column =" 48 " TopLine =" 112 " />
104
104
</Position >
105
105
</JumpHistory >
106
106
<RunParams >
You can’t perform that action at this time.
0 commit comments