Skip to content

Commit 2a771f9

Browse files
committed
v0.3 + Re-creating SSH keys (ssh-keyscan)
1 parent 1597f9e commit 2a771f9

File tree

9 files changed

+44
-64
lines changed

9 files changed

+44
-64
lines changed

sshuttle-gui/backup/sshuttle_gui.lps

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,19 @@
4949
<ResourceBaseClass Value="Form"/>
5050
<UnitName Value="Unit1"/>
5151
<IsVisibleTab Value="True"/>
52-
<CursorPos X="13"/>
52+
<TopLine Value="147"/>
53+
<CursorPos X="42" Y="158"/>
5354
<UsageCount Value="40"/>
5455
<Loaded Value="True"/>
56+
<LoadedDesigner Value="True"/>
5557
</Unit>
5658
<Unit>
5759
<Filename Value="pingtrd.pas"/>
5860
<IsPartOfProject Value="True"/>
5961
<UnitName Value="PingTRD"/>
60-
<EditorIndex Value="1"/>
62+
<EditorIndex Value="-1"/>
6163
<CursorPos X="15"/>
6264
<UsageCount Value="36"/>
63-
<Loaded Value="True"/>
6465
</Unit>
6566
<Unit>
6667
<Filename Value="start_trd.pas"/>
@@ -70,38 +71,14 @@
7071
<UsageCount Value="35"/>
7172
</Unit>
7273
</Units>
73-
<JumpHistory HistoryIndex="7">
74-
<Position>
75-
<Filename Value="unit1.pas"/>
76-
<Caret Column="13"/>
77-
</Position>
78-
<Position>
79-
<Filename Value="unit1.pas"/>
80-
<Caret Line="199" Column="65" TopLine="174"/>
81-
</Position>
82-
<Position>
83-
<Filename Value="unit1.pas"/>
84-
<Caret Line="183" Column="21" TopLine="156"/>
85-
</Position>
86-
<Position>
87-
<Filename Value="unit1.pas"/>
88-
<Caret Line="173" Column="70" TopLine="172"/>
89-
</Position>
90-
<Position>
91-
<Filename Value="unit1.pas"/>
92-
<Caret Line="199" Column="61" TopLine="181"/>
93-
</Position>
94-
<Position>
95-
<Filename Value="unit1.pas"/>
96-
<Caret Column="13"/>
97-
</Position>
74+
<JumpHistory HistoryIndex="1">
9875
<Position>
9976
<Filename Value="unit1.pas"/>
100-
<Caret Line="3" Column="52"/>
77+
<Caret Line="153" Column="3" TopLine="112"/>
10178
</Position>
10279
<Position>
10380
<Filename Value="unit1.pas"/>
104-
<Caret Line="141" Column="62" TopLine="113"/>
81+
<Caret Line="115" TopLine="104"/>
10582
</Position>
10683
</JumpHistory>
10784
<RunParams>

sshuttle-gui/backup/unit1.lfm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ object MainForm: TMainForm
7575
Left = 51
7676
Height = 37
7777
Top = 49
78-
Width = 221
78+
Width = 213
7979
BorderSpacing.Left = 3
8080
BorderSpacing.Top = 6
8181
BorderSpacing.Right = 10
@@ -166,7 +166,7 @@ object MainForm: TMainForm
166166
AnchorSideTop.Control = ServerEdit
167167
AnchorSideTop.Side = asrCenter
168168
AnchorSideRight.Control = PortEdit
169-
Left = 282
169+
Left = 274
170170
Height = 17
171171
Top = 59
172172
Width = 29
@@ -180,10 +180,10 @@ object MainForm: TMainForm
180180
AnchorSideTop.Control = ServerEdit
181181
AnchorSideRight.Control = PasswordEdit
182182
AnchorSideRight.Side = asrBottom
183-
Left = 314
183+
Left = 306
184184
Height = 37
185185
Top = 49
186-
Width = 93
186+
Width = 101
187187
Anchors = [akTop, akLeft, akRight]
188188
BorderSpacing.Left = 3
189189
TabOrder = 3

sshuttle-gui/backup/unit1.pas

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ TMainForm = class(TForm)
4444

4545
var
4646
MainForm: TMainForm;
47+
FormLoaded: boolean;
4748

4849
resourcestring
4950

@@ -111,17 +112,15 @@ procedure TMainForm.FormCreate(Sender: TObject);
111112
if not DirectoryExists('/etc/sshuttle-gui') then MkDir('/etc/sshuttle-gui');
112113

113114
IniPropStorage1.IniFileName := '/etc/sshuttle-gui/settings.conf';
114-
115-
//Поток проверки пинга
116-
FCheckPingThread := CheckPing.Create(False);
117-
FCheckPingThread.Priority := tpNormal;
118115
end;
119116

120117
//Флаг очистки кеша браузеров при старте GUI
121118
procedure TMainForm.ClearBoxChange(Sender: TObject);
122119
var
123120
S: ansistring;
124121
begin
122+
if not FormLoaded then Exit;
123+
125124
if not ClearBox.Checked then
126125
RunCommand('/bin/bash', ['-c', 'rm -f /etc/sshuttle-gui/clear'], S)
127126
else
@@ -133,6 +132,8 @@ procedure TMainForm.AutoStartBoxChange(Sender: TObject);
133132
var
134133
S: ansistring;
135134
begin
135+
if not FormLoaded then Exit;
136+
136137
Screen.Cursor := crHourGlass;
137138
Application.ProcessMessages;
138139

@@ -151,6 +152,12 @@ procedure TMainForm.FormShow(Sender: TObject);
151152

152153
AutostartBox.Checked := CheckAutoStart;
153154
ClearBox.Checked := CheckClear;
155+
156+
//Поток проверки пинга
157+
FCheckPingThread := CheckPing.Create(False);
158+
FCheckPingThread.Priority := tpNormal;
159+
160+
FormLoaded := True;
154161
end;
155162

156163
//Start VPN
0 Bytes
Binary file not shown.
264 Bytes
Binary file not shown.
63 Bytes
Binary file not shown.

sshuttle-gui/sshuttle_gui

0 Bytes
Binary file not shown.

sshuttle-gui/sshuttle_gui.lps

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,9 @@
5858
<Filename Value="pingtrd.pas"/>
5959
<IsPartOfProject Value="True"/>
6060
<UnitName Value="PingTRD"/>
61-
<EditorIndex Value="1"/>
61+
<EditorIndex Value="-1"/>
6262
<CursorPos X="15"/>
6363
<UsageCount Value="36"/>
64-
<Loaded Value="True"/>
6564
</Unit>
6665
<Unit>
6766
<Filename Value="start_trd.pas"/>
@@ -71,38 +70,26 @@
7170
<UsageCount Value="35"/>
7271
</Unit>
7372
</Units>
74-
<JumpHistory HistoryIndex="7">
75-
<Position>
76-
<Filename Value="unit1.pas"/>
77-
<Caret Column="13"/>
78-
</Position>
79-
<Position>
80-
<Filename Value="unit1.pas"/>
81-
<Caret Line="199" Column="65" TopLine="174"/>
82-
</Position>
83-
<Position>
84-
<Filename Value="unit1.pas"/>
85-
<Caret Line="183" Column="21" TopLine="156"/>
86-
</Position>
73+
<JumpHistory HistoryIndex="4">
8774
<Position>
8875
<Filename Value="unit1.pas"/>
89-
<Caret Line="173" Column="70" TopLine="172"/>
76+
<Caret Line="153" Column="3" TopLine="112"/>
9077
</Position>
9178
<Position>
9279
<Filename Value="unit1.pas"/>
93-
<Caret Line="199" Column="61" TopLine="181"/>
80+
<Caret Line="115" TopLine="104"/>
9481
</Position>
9582
<Position>
9683
<Filename Value="unit1.pas"/>
97-
<Caret Column="13"/>
84+
<Caret Line="158" Column="42" TopLine="147"/>
9885
</Position>
9986
<Position>
10087
<Filename Value="unit1.pas"/>
101-
<Caret Line="3" Column="52"/>
88+
<Caret Line="157" Column="3" TopLine="142"/>
10289
</Position>
10390
<Position>
10491
<Filename Value="unit1.pas"/>
105-
<Caret Line="141" Column="62" TopLine="113"/>
92+
<Caret Line="105" TopLine="104"/>
10693
</Position>
10794
</JumpHistory>
10895
<RunParams>

sshuttle-gui/unit1.pas

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ TMainForm = class(TForm)
4444

4545
var
4646
MainForm: TMainForm;
47+
FormLoaded: boolean;
48+
//Флаг загрузки формы от двойного срабатывания чекеров
4749

4850
resourcestring
4951

@@ -101,8 +103,6 @@ function CheckAutoStart: boolean;
101103
end;
102104

103105
procedure TMainForm.FormCreate(Sender: TObject);
104-
var
105-
FCheckPingThread: TThread;
106106
begin
107107
MainForm.Caption := Application.Title;
108108

@@ -111,17 +111,15 @@ procedure TMainForm.FormCreate(Sender: TObject);
111111
if not DirectoryExists('/etc/sshuttle-gui') then MkDir('/etc/sshuttle-gui');
112112

113113
IniPropStorage1.IniFileName := '/etc/sshuttle-gui/settings.conf';
114-
115-
//Поток проверки пинга
116-
FCheckPingThread := CheckPing.Create(False);
117-
FCheckPingThread.Priority := tpNormal;
118114
end;
119115

120116
//Флаг очистки кеша браузеров при старте GUI
121117
procedure TMainForm.ClearBoxChange(Sender: TObject);
122118
var
123119
S: ansistring;
124120
begin
121+
if not FormLoaded then Exit;
122+
125123
if not ClearBox.Checked then
126124
RunCommand('/bin/bash', ['-c', 'rm -f /etc/sshuttle-gui/clear'], S)
127125
else
@@ -133,6 +131,8 @@ procedure TMainForm.AutoStartBoxChange(Sender: TObject);
133131
var
134132
S: ansistring;
135133
begin
134+
if not FormLoaded then Exit;
135+
136136
Screen.Cursor := crHourGlass;
137137
Application.ProcessMessages;
138138

@@ -144,13 +144,22 @@ procedure TMainForm.AutoStartBoxChange(Sender: TObject);
144144
end;
145145

146146
procedure TMainForm.FormShow(Sender: TObject);
147+
var
148+
FCheckPingThread: TThread;
147149
begin
148150
//Высота/Ширина формы (Auto)
149151
MainForm.Height := ClearBox.Top + ClearBox.Height + StaticText1.Height + 6;
150152
MainForm.Width := StartBtn.Left + StartBtn.Height + 25;
151153

152154
AutostartBox.Checked := CheckAutoStart;
153155
ClearBox.Checked := CheckClear;
156+
157+
//Поток проверки пинга
158+
FCheckPingThread := CheckPing.Create(False);
159+
FCheckPingThread.Priority := tpNormal;
160+
161+
//Флаг загрузки формы от двойного срабатывания чекеров
162+
FormLoaded := True;
154163
end;
155164

156165
//Start VPN

0 commit comments

Comments
 (0)