diff --git a/sshuttle-gui/backup/pingtrd.pas b/sshuttle-gui/backup/pingtrd.pas
index 28693dc..ddfc5a6 100644
--- a/sshuttle-gui/backup/pingtrd.pas
+++ b/sshuttle-gui/backup/pingtrd.pas
@@ -61,7 +61,7 @@ procedure CheckPing.Execute;
end;
end;
-//Индикация - светодиод
+//Индикация: Cветодиод, Режим
procedure CheckPing.ShowStatus;
begin
with MainForm do
diff --git a/sshuttle-gui/backup/sshuttle_gui.lpi b/sshuttle-gui/backup/sshuttle_gui.lpi
index 73233ca..4c37f08 100644
--- a/sshuttle-gui/backup/sshuttle_gui.lpi
+++ b/sshuttle-gui/backup/sshuttle_gui.lpi
@@ -4,7 +4,7 @@
-
+
diff --git a/sshuttle-gui/backup/sshuttle_gui.lpr b/sshuttle-gui/backup/sshuttle_gui.lpr
index 3580b43..1a8ae30 100644
--- a/sshuttle-gui/backup/sshuttle_gui.lpr
+++ b/sshuttle-gui/backup/sshuttle_gui.lpr
@@ -17,8 +17,8 @@
begin
RequireDerivedFormResource := True;
- Application.Title := 'SShuttle-GUI v0.1';
- Application.Scaled := True;
+ Application.Title:='SShuttle-GUI v0.3';
+ Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TMainForm, MainForm);
Application.Run;
diff --git a/sshuttle-gui/backup/sshuttle_gui.lps b/sshuttle-gui/backup/sshuttle_gui.lps
index 6dd70ec..2cac23a 100644
--- a/sshuttle-gui/backup/sshuttle_gui.lps
+++ b/sshuttle-gui/backup/sshuttle_gui.lps
@@ -39,7 +39,7 @@
-
+
@@ -49,10 +49,9 @@
-
-
-
-
+
+
+
@@ -60,9 +59,10 @@
+
-
-
+
+
@@ -73,7 +73,7 @@
-
+
@@ -186,6 +186,14 @@
+
+
+
+
+
+
+
+
diff --git a/sshuttle-gui/backup/unit1.lfm b/sshuttle-gui/backup/unit1.lfm
index e9cf991..1838c8d 100644
--- a/sshuttle-gui/backup/unit1.lfm
+++ b/sshuttle-gui/backup/unit1.lfm
@@ -1,15 +1,15 @@
object MainForm: TMainForm
- Left = 263
- Height = 175
- Top = 126
+ Left = 287
+ Height = 189
+ Top = 125
Width = 531
Caption = 'SShuttle-GUI'
- ClientHeight = 175
+ ClientHeight = 189
ClientWidth = 531
OnCreate = FormCreate
OnShow = FormShow
SessionProperties = 'IPv6Box.Checked;LatencyBox.Checked;Left;PasswordEdit.Text;PortEdit.Text;RouterEdit.Text;ServerEdit.Text;Top;UserEdit.Text'
- LCLVersion = '2.2.4.0'
+ LCLVersion = '3.2.0.0'
object Label1: TLabel
AnchorSideTop.Side = asrCenter
Left = 8
@@ -87,13 +87,13 @@ object MainForm: TMainForm
AnchorSideRight.Side = asrBottom
Left = 283
Height = 32
- Top = 134
+ Top = 135
Width = 242
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = 'Clear browser cookies on start GUI'
- OnChange = ClearBoxChange
TabOrder = 7
+ OnChange = ClearBoxChange
end
object AutoStartBox: TCheckBox
AnchorSideLeft.Control = StartBtn
@@ -107,8 +107,8 @@ object MainForm: TMainForm
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = 'Autostart VPN on reboot'
- OnChange = AutoStartBoxChange
TabOrder = 5
+ OnChange = AutoStartBoxChange
end
object StartBtn: TSpeedButton
AnchorSideLeft.Control = Shape1
@@ -134,7 +134,7 @@ object MainForm: TMainForm
object StaticText1: TStaticText
Left = 0
Height = 20
- Top = 155
+ Top = 169
Width = 531
Align = alBottom
BorderStyle = sbsSingle
@@ -205,9 +205,9 @@ object MainForm: TMainForm
AnchorSideTop.Side = asrBottom
Left = 8
Height = 32
- Top = 134
+ Top = 135
Width = 161
- BorderSpacing.Top = 2
+ BorderSpacing.Top = 3
Caption = '--no-latency-control'
Checked = True
State = cbChecked
diff --git a/sshuttle-gui/backup/unit1.pas b/sshuttle-gui/backup/unit1.pas
index cf1d130..4f91dcd 100644
--- a/sshuttle-gui/backup/unit1.pas
+++ b/sshuttle-gui/backup/unit1.pas
@@ -54,9 +54,9 @@ implementation
uses pingtrd;
-{$R *.lfm}
+ {$R *.lfm}
-{ TMainForm }
+ { TMainForm }
//Общая процедура запуска команд (асинхронная)
procedure TMainForm.StartProcess(command: string);
@@ -178,37 +178,45 @@ procedure TMainForm.StartBtnClick(Sender: TObject);
StartProcess('systemctl stop sshuttle.service');
end
else
- try
- S := TStringList.Create;
-
- S.Add('#!/bin/bash');
- S.Add('');
-
- //Содаём пускач для systemd (Type=simple)
- S.Add('# Проверка наличия валидных ключей /root/.ssh/{known_hosts,known_hosts.old}');
- S.Add('if [[ ! -f /root/.ssh/known_hosts.old ]] || [[ -z $(ssh-keygen -F ' +
- Trim(ServerEDit.Text) + ') ]]; then');
- S.Add('sshpass -p "' + Trim(PasswordEdit.Text) +
- '" ssh -o StrictHostKeyChecking=No ' + Trim(UserEdit.Text) +
- '@' + Trim(ServerEDit.Text) + ' -p ' + Trim(PortEdit.Text) + ' exit 0; fi');
- S.Add('');
- S.Add('# Запуск vpn');
- S.Add('[[ "$?" -eq "0" ]] && \');
- S.Add('sshpass -p "' + Trim(PasswordEdit.Text) +
- '" sshuttle --dns --remote ' + Trim(UserEdit.Text) + '@' +
- Trim(ServerEDit.Text) + ':' + Trim(PortEdit.Text) + ' -x ' +
- Trim(ServerEDit.Text) + ':' + Trim(PortEdit.Text) + ' 0/0 ' + Trim(Pars));
-
- S.Add('exit 0;');
-
- S.SaveToFile('/etc/sshuttle-gui/connect.sh');
-
- //Запускаем скрипт через systemd
- StartProcess('chmod +x /etc/sshuttle-gui/connect.sh; systemctl restart sshuttle.service');
-
- finally
- S.Free;
- end;
+ try
+ S := TStringList.Create;
+
+ S.Add('#!/bin/bash');
+ S.Add('');
+
+ //Содаём пускач для systemd (Type=simple)
+ S.Add('# Проверка наличия валидных ключей /root/.ssh/{known_hosts,known_hosts.old}');
+
+ //Очистка прежних ключей (мог измениться пароль или хост)
+ S.Add('sed -i "/^' + Trim(ServerEDit.Text) + '/d" /root/.ssh/known_hosts');
+
+ { S.Add('if [[ ! -f /root/.ssh/known_hosts.old ]] || [[ -z $(ssh-keygen -F ' +
+ Trim(ServerEDit.Text) + ') ]]; then'); }
+
+ S.Add('sshpass -p "' + Trim(PasswordEdit.Text) +
+ '" ssh -o StrictHostKeyChecking=No ' + Trim(UserEdit.Text) +
+ // '@' + Trim(ServerEDit.Text) + ' -p ' + Trim(PortEdit.Text) + ' exit 0; fi');
+ '@' + Trim(ServerEDit.Text) + ' -p ' + Trim(PortEdit.Text) + ' exit 0');
+
+ S.Add('');
+
+ S.Add('# Запуск vpn');
+ S.Add('[[ "$?" -eq "0" ]] && \');
+ S.Add('sshpass -p "' + Trim(PasswordEdit.Text) + '" sshuttle --dns --remote ' +
+ Trim(UserEdit.Text) + '@' + Trim(ServerEDit.Text) + ':' +
+ Trim(PortEdit.Text) + ' -x ' + Trim(ServerEDit.Text) + ':' +
+ Trim(PortEdit.Text) + ' 0/0 ' + Trim(Pars));
+
+ S.Add('exit 0;');
+
+ S.SaveToFile('/etc/sshuttle-gui/connect.sh');
+
+ //Запускаем скрипт через systemd
+ StartProcess('chmod +x /etc/sshuttle-gui/connect.sh; systemctl restart sshuttle.service');
+
+ finally
+ S.Free;
+ end;
end;
diff --git a/sshuttle-gui/lib/x86_64-linux/pingtrd.o b/sshuttle-gui/lib/x86_64-linux/pingtrd.o
index 1a40869..183a641 100644
Binary files a/sshuttle-gui/lib/x86_64-linux/pingtrd.o and b/sshuttle-gui/lib/x86_64-linux/pingtrd.o differ
diff --git a/sshuttle-gui/lib/x86_64-linux/pingtrd.ppu b/sshuttle-gui/lib/x86_64-linux/pingtrd.ppu
index 09a2bf0..07993ad 100644
Binary files a/sshuttle-gui/lib/x86_64-linux/pingtrd.ppu and b/sshuttle-gui/lib/x86_64-linux/pingtrd.ppu differ
diff --git a/sshuttle-gui/lib/x86_64-linux/sshuttle_gui.o b/sshuttle-gui/lib/x86_64-linux/sshuttle_gui.o
index 995a6f0..7633e65 100644
Binary files a/sshuttle-gui/lib/x86_64-linux/sshuttle_gui.o and b/sshuttle-gui/lib/x86_64-linux/sshuttle_gui.o differ
diff --git a/sshuttle-gui/lib/x86_64-linux/sshuttle_gui.or b/sshuttle-gui/lib/x86_64-linux/sshuttle_gui.or
index 9c28094..8dcf4b5 100644
Binary files a/sshuttle-gui/lib/x86_64-linux/sshuttle_gui.or and b/sshuttle-gui/lib/x86_64-linux/sshuttle_gui.or differ
diff --git a/sshuttle-gui/lib/x86_64-linux/unit1.lfm b/sshuttle-gui/lib/x86_64-linux/unit1.lfm
index cab0461..1838c8d 100644
--- a/sshuttle-gui/lib/x86_64-linux/unit1.lfm
+++ b/sshuttle-gui/lib/x86_64-linux/unit1.lfm
@@ -9,7 +9,7 @@ object MainForm: TMainForm
OnCreate = FormCreate
OnShow = FormShow
SessionProperties = 'IPv6Box.Checked;LatencyBox.Checked;Left;PasswordEdit.Text;PortEdit.Text;RouterEdit.Text;ServerEdit.Text;Top;UserEdit.Text'
- LCLVersion = '2.2.4.0'
+ LCLVersion = '3.2.0.0'
object Label1: TLabel
AnchorSideTop.Side = asrCenter
Left = 8
@@ -92,8 +92,8 @@ object MainForm: TMainForm
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = 'Clear browser cookies on start GUI'
- OnChange = ClearBoxChange
TabOrder = 7
+ OnChange = ClearBoxChange
end
object AutoStartBox: TCheckBox
AnchorSideLeft.Control = StartBtn
@@ -107,8 +107,8 @@ object MainForm: TMainForm
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = 'Autostart VPN on reboot'
- OnChange = AutoStartBoxChange
TabOrder = 5
+ OnChange = AutoStartBoxChange
end
object StartBtn: TSpeedButton
AnchorSideLeft.Control = Shape1
diff --git a/sshuttle-gui/lib/x86_64-linux/unit1.o b/sshuttle-gui/lib/x86_64-linux/unit1.o
index a8a7c41..338f1bd 100644
Binary files a/sshuttle-gui/lib/x86_64-linux/unit1.o and b/sshuttle-gui/lib/x86_64-linux/unit1.o differ
diff --git a/sshuttle-gui/lib/x86_64-linux/unit1.ppu b/sshuttle-gui/lib/x86_64-linux/unit1.ppu
index 853c91f..ea04e9a 100644
Binary files a/sshuttle-gui/lib/x86_64-linux/unit1.ppu and b/sshuttle-gui/lib/x86_64-linux/unit1.ppu differ
diff --git a/sshuttle-gui/package-project/sshuttle-gui.prj b/sshuttle-gui/package-project/sshuttle-gui.prj
index 4207647..b7c26df 100644
--- a/sshuttle-gui/package-project/sshuttle-gui.prj
+++ b/sshuttle-gui/package-project/sshuttle-gui.prj
@@ -2,13 +2,13 @@
name=sshuttle-gui
[VERSION]
-version=0.2
+version=0.3
[RELEASE]
release=0.mrx9
[GROUP]
-group=Applications/System
+group=Networking/Other
[DESCRIPTION]
0=GUI for SShuttle - Transparent proxy server that works as a poor man's VPN. Forwards over ssh.
@@ -67,11 +67,16 @@ programname=SShuttle-GUI
devtool=Lazarus
[TOOLVERSION]
-toolversion=2.2.4
+toolversion=3.2
[INFO]
-0=v0.2
-1=+ Improved startup sshuttle.service
-2=+ RPM-packages for Mageia-8, ROSA Linux and Mageia-9
-3=
-4=v0.1 - initial release
+0=v0.3
+1=+ Recompiling in Lazarus 3.2
+2=+ Re-creating SSH keys (changing server password, etc.)
+3=+ RPM-packages for Mageia-9 and Ubuntu
+4=
+5=v0.2
+6=+ Improved startup sshuttle.service
+7=+ RPM-packages for Mageia-8, ROSA Linux and Mageia-9
+8=
+9=v0.1 - initial release
diff --git a/sshuttle-gui/pingtrd.pas b/sshuttle-gui/pingtrd.pas
index ddfc5a6..58a24cc 100644
--- a/sshuttle-gui/pingtrd.pas
+++ b/sshuttle-gui/pingtrd.pas
@@ -25,7 +25,7 @@ implementation
uses unit1;
-{ TRD }
+ { TRD }
procedure CheckPing.Execute;
var
@@ -75,7 +75,7 @@ procedure CheckPing.ShowStatus;
begin
StartBtn.Caption := SStart;
Shape1.Brush.Color := clYellow;
- end;
+ end;
Shape1.Repaint;
StartBtn.Repaint;
diff --git a/sshuttle-gui/sshuttle_gui b/sshuttle-gui/sshuttle_gui
index f1f4dcd..c17a7f0 100755
Binary files a/sshuttle-gui/sshuttle_gui and b/sshuttle-gui/sshuttle_gui differ
diff --git a/sshuttle-gui/sshuttle_gui.lpi b/sshuttle-gui/sshuttle_gui.lpi
index 61d528c..4c37f08 100644
--- a/sshuttle-gui/sshuttle_gui.lpi
+++ b/sshuttle-gui/sshuttle_gui.lpi
@@ -4,7 +4,7 @@
-
+
diff --git a/sshuttle-gui/sshuttle_gui.lpr b/sshuttle-gui/sshuttle_gui.lpr
index 045f071..44114cc 100644
--- a/sshuttle-gui/sshuttle_gui.lpr
+++ b/sshuttle-gui/sshuttle_gui.lpr
@@ -3,22 +3,22 @@
{$mode objfpc}{$H+}
uses
- {$IFDEF UNIX}
+ {$IFDEF UNIX}
cthreads,
- {$ENDIF} {$IFDEF HASAMIGA}
+ {$ENDIF}{$IFDEF HASAMIGA}
athreads,
- {$ENDIF}
+ {$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms,
Unit1,
PingTRD { you can add units after this };
-{$R *.res}
+ {$R *.res}
begin
RequireDerivedFormResource := True;
- Application.Title:='SShuttle-GUI v0.2';
- Application.Scaled:=True;
+ Application.Title := 'SShuttle-GUI v0.3';
+ Application.Scaled := True;
Application.Initialize;
Application.CreateForm(TMainForm, MainForm);
Application.Run;
diff --git a/sshuttle-gui/sshuttle_gui.lps b/sshuttle-gui/sshuttle_gui.lps
index 6dd70ec..bbb493a 100644
--- a/sshuttle-gui/sshuttle_gui.lps
+++ b/sshuttle-gui/sshuttle_gui.lps
@@ -39,7 +39,7 @@
-
+
@@ -50,9 +50,9 @@
-
-
-
+
+
+
@@ -61,8 +61,8 @@
-
-
+
+
@@ -73,7 +73,7 @@
-
+
@@ -186,6 +186,14 @@
+
+
+
+
+
+
+
+
diff --git a/sshuttle-gui/unit1.lfm b/sshuttle-gui/unit1.lfm
index cab0461..1838c8d 100644
--- a/sshuttle-gui/unit1.lfm
+++ b/sshuttle-gui/unit1.lfm
@@ -9,7 +9,7 @@ object MainForm: TMainForm
OnCreate = FormCreate
OnShow = FormShow
SessionProperties = 'IPv6Box.Checked;LatencyBox.Checked;Left;PasswordEdit.Text;PortEdit.Text;RouterEdit.Text;ServerEdit.Text;Top;UserEdit.Text'
- LCLVersion = '2.2.4.0'
+ LCLVersion = '3.2.0.0'
object Label1: TLabel
AnchorSideTop.Side = asrCenter
Left = 8
@@ -92,8 +92,8 @@ object MainForm: TMainForm
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = 'Clear browser cookies on start GUI'
- OnChange = ClearBoxChange
TabOrder = 7
+ OnChange = ClearBoxChange
end
object AutoStartBox: TCheckBox
AnchorSideLeft.Control = StartBtn
@@ -107,8 +107,8 @@ object MainForm: TMainForm
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = 'Autostart VPN on reboot'
- OnChange = AutoStartBoxChange
TabOrder = 5
+ OnChange = AutoStartBoxChange
end
object StartBtn: TSpeedButton
AnchorSideLeft.Control = Shape1
diff --git a/sshuttle-gui/unit1.pas b/sshuttle-gui/unit1.pas
index cf1d130..9a10403 100644
--- a/sshuttle-gui/unit1.pas
+++ b/sshuttle-gui/unit1.pas
@@ -54,9 +54,9 @@ implementation
uses pingtrd;
-{$R *.lfm}
+ {$R *.lfm}
-{ TMainForm }
+ { TMainForm }
//Общая процедура запуска команд (асинхронная)
procedure TMainForm.StartProcess(command: string);
@@ -178,37 +178,46 @@ procedure TMainForm.StartBtnClick(Sender: TObject);
StartProcess('systemctl stop sshuttle.service');
end
else
- try
- S := TStringList.Create;
-
- S.Add('#!/bin/bash');
- S.Add('');
-
- //Содаём пускач для systemd (Type=simple)
- S.Add('# Проверка наличия валидных ключей /root/.ssh/{known_hosts,known_hosts.old}');
- S.Add('if [[ ! -f /root/.ssh/known_hosts.old ]] || [[ -z $(ssh-keygen -F ' +
- Trim(ServerEDit.Text) + ') ]]; then');
- S.Add('sshpass -p "' + Trim(PasswordEdit.Text) +
- '" ssh -o StrictHostKeyChecking=No ' + Trim(UserEdit.Text) +
- '@' + Trim(ServerEDit.Text) + ' -p ' + Trim(PortEdit.Text) + ' exit 0; fi');
- S.Add('');
- S.Add('# Запуск vpn');
- S.Add('[[ "$?" -eq "0" ]] && \');
- S.Add('sshpass -p "' + Trim(PasswordEdit.Text) +
- '" sshuttle --dns --remote ' + Trim(UserEdit.Text) + '@' +
- Trim(ServerEDit.Text) + ':' + Trim(PortEdit.Text) + ' -x ' +
- Trim(ServerEDit.Text) + ':' + Trim(PortEdit.Text) + ' 0/0 ' + Trim(Pars));
-
- S.Add('exit 0;');
-
- S.SaveToFile('/etc/sshuttle-gui/connect.sh');
-
- //Запускаем скрипт через systemd
- StartProcess('chmod +x /etc/sshuttle-gui/connect.sh; systemctl restart sshuttle.service');
-
- finally
- S.Free;
- end;
+ try
+ S := TStringList.Create;
+
+ S.Add('#!/bin/bash');
+ S.Add('');
+
+ //Содаём пускач для systemd (Type=simple)
+ S.Add('# Пересоздание ключей в /root/.ssh/known_hosts (пароль мог изменяться)');
+
+ //Очистка прежних ключей (мог измениться пароль или хост)
+ S.Add('sed -i "/^' + Trim(ServerEDit.Text) + '/d" /root/.ssh/known_hosts');
+
+ { S.Add('if [[ ! -f /root/.ssh/known_hosts.old ]] || [[ -z $(ssh-keygen -F ' +
+ Trim(ServerEDit.Text) + ') ]]; then'); }
+
+ //Пересоздать ключи для хоста (пароль мог измениться)
+ S.Add('sshpass -p "' + Trim(PasswordEdit.Text) +
+ '" ssh -o StrictHostKeyChecking=No ' + Trim(UserEdit.Text) +
+ // '@' + Trim(ServerEDit.Text) + ' -p ' + Trim(PortEdit.Text) + ' exit 0; fi');
+ '@' + Trim(ServerEDit.Text) + ' -p ' + Trim(PortEdit.Text) + ' exit 0');
+
+ S.Add('');
+
+ S.Add('# Запуск vpn');
+ S.Add('[[ "$?" -eq "0" ]] && \');
+ S.Add('sshpass -p "' + Trim(PasswordEdit.Text) + '" sshuttle --dns --remote ' +
+ Trim(UserEdit.Text) + '@' + Trim(ServerEDit.Text) + ':' +
+ Trim(PortEdit.Text) + ' -x ' + Trim(ServerEDit.Text) + ':' +
+ Trim(PortEdit.Text) + ' 0/0 ' + Trim(Pars));
+
+ S.Add('exit 0;');
+
+ S.SaveToFile('/etc/sshuttle-gui/connect.sh');
+
+ //Запускаем скрипт через systemd
+ StartProcess('chmod +x /etc/sshuttle-gui/connect.sh; systemctl restart sshuttle.service');
+
+ finally
+ S.Free;
+ end;
end;