SiteAdvanced.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. //----------------------------------------------------------------------------
  2. #ifndef SiteAdvancedH
  3. #define SiteAdvancedH
  4. //----------------------------------------------------------------------------
  5. #include "ComboEdit.hpp"
  6. #include "PasswordEdit.hpp"
  7. #include "UpDownEdit.hpp"
  8. #include <System.Classes.hpp>
  9. #include <Vcl.ActnList.hpp>
  10. #include <Vcl.ComCtrls.hpp>
  11. #include <Vcl.Controls.hpp>
  12. #include <Vcl.ExtCtrls.hpp>
  13. #include <Vcl.Forms.hpp>
  14. #include <Vcl.ImgList.hpp>
  15. #include <Vcl.Mask.hpp>
  16. #include <Vcl.Menus.hpp>
  17. #include <Vcl.StdCtrls.hpp>
  18. //----------------------------------------------------------------------------
  19. #include <Configuration.h>
  20. #include <SessionData.h>
  21. #include <PasTools.hpp>
  22. #include "PngImageList.hpp"
  23. //----------------------------------------------------------------------------
  24. class TSiteAdvancedDialog : public TForm
  25. {
  26. __published:
  27. TPanel *MainPanel;
  28. TPageControl *PageControl;
  29. TTabSheet *AdvancedSheet;
  30. TGroupBox *ProtocolGroup;
  31. TLabel *Label7;
  32. TCheckBox *CompressionCheck;
  33. TTabSheet *EnvironmentSheet;
  34. TTabSheet *ScpSheet;
  35. TGroupBox *OtherShellOptionsGroup;
  36. TCheckBox *LookupUserGroupsCheck;
  37. TCheckBox *ClearAliasesCheck;
  38. TCheckBox *UnsetNationalVarsCheck;
  39. TCheckBox *Scp1CompatibilityCheck;
  40. TGroupBox *ShellGroup;
  41. TComboBox *ShellEdit;
  42. TPanel *LeftPanel;
  43. TTreeView *NavigationTree;
  44. TTabSheet *ConnSheet;
  45. TGroupBox *TimeoutGroup;
  46. TLabel *Label11;
  47. TLabel *Label12;
  48. TUpDownEdit *TimeoutEdit;
  49. TTabSheet *ProxySheet;
  50. TGroupBox *ProxyTypeGroup;
  51. TLabel *ProxyHostLabel;
  52. TLabel *ProxyPortLabel;
  53. TUpDownEdit *ProxyPortEdit;
  54. TEdit *ProxyHostEdit;
  55. TEdit *ProxyUsernameEdit;
  56. TLabel *ProxyUsernameLabel;
  57. TLabel *ProxyPasswordLabel;
  58. TPasswordEdit *ProxyPasswordEdit;
  59. TGroupBox *ProxySettingsGroup;
  60. TLabel *ProxyTelnetCommandLabel;
  61. TEdit *ProxyTelnetCommandEdit;
  62. TTabSheet *BugsSheet;
  63. TGroupBox *BugsGroupBox;
  64. TLabel *BugIgnore1Label;
  65. TComboBox *BugIgnore1Combo;
  66. TLabel *BugPlainPW1Label;
  67. TComboBox *BugPlainPW1Combo;
  68. TLabel *BugRSA1Label;
  69. TComboBox *BugRSA1Combo;
  70. TLabel *BugHMAC2Label;
  71. TComboBox *BugHMAC2Combo;
  72. TLabel *BugDeriveKey2Label;
  73. TComboBox *BugDeriveKey2Combo;
  74. TLabel *BugRSAPad2Label;
  75. TComboBox *BugRSAPad2Combo;
  76. TTabSheet *AuthSheet;
  77. TGroupBox *AuthenticationGroup;
  78. TCheckBox *AuthTISCheck;
  79. TCheckBox *AuthKICheck;
  80. TGroupBox *EncryptionGroup;
  81. TListBox *CipherListBox;
  82. TLabel *Label8;
  83. TCheckBox *Ssh2LegacyDESCheck;
  84. TButton *CipherUpButton;
  85. TButton *CipherDownButton;
  86. TGroupBox *EnvironmentGroup;
  87. TLabel *BugPKSessID2Label;
  88. TComboBox *BugPKSessID2Combo;
  89. TCheckBox *ProxyLocalhostCheck;
  90. TLabel *Label17;
  91. TGroupBox *PingGroup;
  92. TLabel *PingIntervalLabel;
  93. TUpDownEdit *PingIntervalSecEdit;
  94. TRadioButton *PingOffButton;
  95. TRadioButton *PingNullPacketButton;
  96. TRadioButton *PingDummyCommandButton;
  97. TCheckBox *AuthKIPasswordCheck;
  98. TTabSheet *DirectoriesSheet;
  99. TGroupBox *DirectoriesGroup;
  100. TLabel *LocalDirectoryLabel;
  101. TLabel *RemoteDirectoryLabel;
  102. TLabel *LocalDirectoryDescLabel;
  103. TDirectoryEdit *LocalDirectoryEdit;
  104. TEdit *RemoteDirectoryEdit;
  105. TCheckBox *UpdateDirectoriesCheck;
  106. TCheckBox *CacheDirectoriesCheck;
  107. TCheckBox *ResolveSymlinksCheck;
  108. TCheckBox *CacheDirectoryChangesCheck;
  109. TCheckBox *PreserveDirectoryChangesCheck;
  110. TGroupBox *DSTModeGroup;
  111. TRadioButton *DSTModeUnixCheck;
  112. TRadioButton *DSTModeWinCheck;
  113. TGroupBox *ScpLsOptionsGroup;
  114. TCheckBox *IgnoreLsWarningsCheck;
  115. TCheckBox *SCPLsFullTimeAutoCheck;
  116. TTabSheet *SftpSheet;
  117. TGroupBox *SFTPBugsGroupBox;
  118. TLabel *Label10;
  119. TLabel *Label36;
  120. TComboBox *SFTPBugSymlinkCombo;
  121. TTabSheet *KexSheet;
  122. TGroupBox *KexOptionsGroup;
  123. TLabel *Label28;
  124. TListBox *KexListBox;
  125. TButton *KexUpButton;
  126. TButton *KexDownButton;
  127. TGroupBox *KexReexchangeGroup;
  128. TLabel *Label31;
  129. TUpDownEdit *RekeyTimeEdit;
  130. TLabel *Label32;
  131. TEdit *RekeyDataEdit;
  132. TGroupBox *IPvGroup;
  133. TRadioButton *IPAutoButton;
  134. TRadioButton *IPv4Button;
  135. TRadioButton *IPv6Button;
  136. TLabel *BugRekey2Label;
  137. TComboBox *BugRekey2Combo;
  138. TGroupBox *SFTPProtocolGroup;
  139. TLabel *Label34;
  140. TComboBox *SFTPMaxVersionCombo;
  141. TComboBox *SFTPBugSignedTSCombo;
  142. TGroupBox *DirectoryOptionsGroup;
  143. TTabSheet *TunnelSheet;
  144. TGroupBox *TunnelSessionGroup;
  145. TLabel *Label6;
  146. TLabel *Label14;
  147. TLabel *Label15;
  148. TLabel *Label16;
  149. TLabel *Label18;
  150. TEdit *TunnelHostNameEdit;
  151. TEdit *TunnelUserNameEdit;
  152. TPasswordEdit *TunnelPasswordEdit;
  153. TUpDownEdit *TunnelPortNumberEdit;
  154. TFilenameEdit *TunnelPrivateKeyEdit2;
  155. TLabel *Label19;
  156. TComboBox *ReturnVarEdit;
  157. TLabel *Label20;
  158. TGroupBox *AuthenticationParamsGroup;
  159. TCheckBox *AgentFwdCheck;
  160. TCheckBox *TunnelCheck;
  161. TGroupBox *TunnelOptionsGroup;
  162. TLabel *Label21;
  163. TComboBox *TunnelLocalPortNumberEdit;
  164. TRadioButton *DSTModeKeepCheck;
  165. TGroupBox *ConnectionGroup;
  166. TCheckBox *FtpPasvModeCheck;
  167. TTabSheet *RecycleBinSheet;
  168. TGroupBox *RecycleBinGroup;
  169. TLabel *RecycleBinPathLabel;
  170. TCheckBox *DeleteToRecycleBinCheck;
  171. TCheckBox *OverwrittenToRecycleBinCheck;
  172. TEdit *RecycleBinPathEdit;
  173. TLabel *EOLTypeLabel;
  174. TComboBox *EOLTypeCombo;
  175. TLabel *UtfLabel;
  176. TComboBox *UtfCombo;
  177. TLabel *TimeDifferenceLabel;
  178. TUpDownEdit *TimeDifferenceEdit;
  179. TLabel *TimeDifferenceHoursLabel;
  180. TUpDownEdit *TimeDifferenceMinutesEdit;
  181. TLabel *TimeDifferenceMinutesLabel;
  182. TLabel *Label9;
  183. TComboBox *ListingCommandEdit;
  184. TCheckBox *SshNoUserAuthCheck;
  185. TCheckBox *TryAgentCheck;
  186. TLabel *ProxyMethodLabel;
  187. TComboBox *SshProxyMethodCombo;
  188. TComboBox *ProxyDNSCombo;
  189. TComboBox *FtpProxyMethodCombo;
  190. TLabel *ProxyLocalCommandLabel;
  191. TEdit *ProxyLocalCommandEdit;
  192. TButton *ProxyLocalCommandBrowseButton;
  193. TStaticText *ProxyTelnetCommandHintText;
  194. TStaticText *ProxyLocalCommandHintText;
  195. TGroupBox *FtpPingGroup;
  196. TLabel *FtpPingIntervalLabel;
  197. TUpDownEdit *FtpPingIntervalSecEdit;
  198. TRadioButton *FtpPingOffButton;
  199. TRadioButton *FtpPingNullPacketButton;
  200. TRadioButton *FtpPingDummyCommandButton;
  201. TLabel *Label23;
  202. TComboBox *SftpServerEdit;
  203. TTabSheet *FtpSheet;
  204. TGroupBox *FtpGroup;
  205. TLabel *Label25;
  206. TMemo *PostLoginCommandsMemo;
  207. TLabel *BugMaxPkt2Label;
  208. TComboBox *BugMaxPkt2Combo;
  209. TLabel *FtpListAllLabel;
  210. TComboBox *FtpListAllCombo;
  211. TComboBox *FtpForcePasvIpCombo;
  212. TCheckBox *AllowScpFallbackCheck;
  213. TCheckBox *BufferSizeCheck;
  214. TCheckBox *SynchronizeBrowsingCheck;
  215. TGroupBox *GSSAPIGroup;
  216. TCheckBox *AuthGSSAPICheck3;
  217. TCheckBox *GSSAPIFwdTGTCheck;
  218. TLabel *BugIgnore2Label;
  219. TComboBox *BugIgnore2Combo;
  220. TComboBox *WebDavProxyMethodCombo;
  221. TLabel *Label24;
  222. TComboBox *FtpUseMlsdCombo;
  223. TLabel *FtpForcePasvIpLabel;
  224. TButton *OKBtn;
  225. TButton *CancelBtn;
  226. TButton *HelpButton;
  227. TLabel *FtpAccountLabel;
  228. TEdit *FtpAccountEdit;
  229. TLabel *PrivateKeyLabel;
  230. TFilenameEdit *PrivateKeyEdit2;
  231. TGroupBox *TunnelAuthenticationParamsGroup;
  232. TImageList *ColorImageList;
  233. TButton *ColorButton;
  234. TTabSheet *SslSheet;
  235. TGroupBox *SslGroup;
  236. TLabel *Label1;
  237. TComboBox *MinTlsVersionCombo;
  238. TLabel *Label2;
  239. TComboBox *MaxTlsVersionCombo;
  240. TCheckBox *SslSessionReuseCheck;
  241. TLabel *BugWinAdjLabel;
  242. TComboBox *BugWinAdjCombo;
  243. TButton *ProxyAutodetectButton;
  244. TTabSheet *NoteSheet;
  245. TGroupBox *NoteGroup;
  246. TMemo *NoteMemo;
  247. TCheckBox *TimeDifferenceAutoCheck;
  248. TLabel *Label3;
  249. TComboBox *FtpHostCombo;
  250. TGroupBox *TlsAuthenticationGroup;
  251. TLabel *Label4;
  252. TFilenameEdit *TlsCertificateFileEdit;
  253. TCheckBox *TrimVMSVersionsCheck;
  254. TComboBox *SshProtCombo2;
  255. TCheckBox *FollowDirectorySymlinksCheck;
  256. void __fastcall DataChange(TObject *Sender);
  257. void __fastcall FormShow(TObject *Sender);
  258. void __fastcall PageControlChange(TObject *Sender);
  259. void __fastcall AlgListBoxStartDrag(TObject *Sender,
  260. TDragObject *&DragObject);
  261. void __fastcall AlgListBoxDragOver(TObject *Sender, TObject *Source,
  262. int X, int Y, TDragState State, bool &Accept);
  263. void __fastcall AlgListBoxDragDrop(TObject *Sender, TObject *Source,
  264. int X, int Y);
  265. void __fastcall CipherButtonClick(TObject *Sender);
  266. void __fastcall AuthGSSAPICheck3Click(TObject *Sender);
  267. void __fastcall KexButtonClick(TObject *Sender);
  268. void __fastcall HelpButtonClick(TObject *Sender);
  269. void __fastcall PrivateKeyEdit2AfterDialog(TObject *Sender,
  270. UnicodeString &Name, bool &Action);
  271. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  272. void __fastcall PathEditBeforeDialog(TObject *Sender, UnicodeString &Name,
  273. bool &Action);
  274. void __fastcall PathEditAfterDialog(TObject * Sender,
  275. UnicodeString & Name, bool & Action);
  276. void __fastcall NavigationTreeCollapsing(TObject *Sender,
  277. TTreeNode *Node, bool &AllowCollapse);
  278. void __fastcall ProxyLocalCommandBrowseButtonClick(TObject *Sender);
  279. void __fastcall NavigationTreeChange(TObject * Sender,
  280. TTreeNode * Node);
  281. void __fastcall ColorButtonClick(TObject *Sender);
  282. void __fastcall MinTlsVersionComboChange(TObject *Sender);
  283. void __fastcall MaxTlsVersionComboChange(TObject *Sender);
  284. void __fastcall ProxyAutodetectButtonClick(TObject *Sender);
  285. void __fastcall NoteMemoKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
  286. void __fastcall TlsCertificateFileEditAfterDialog(TObject *Sender, UnicodeString &Name,
  287. bool &Action);
  288. public:
  289. virtual __fastcall TSiteAdvancedDialog(TComponent * AOwner);
  290. bool __fastcall Execute(TSessionData * SessionData);
  291. protected:
  292. void __fastcall ChangePage(TTabSheet * Tab);
  293. virtual void __fastcall Dispatch(void * Message);
  294. bool __fastcall AllowAlgDrag(TListBox * AlgListBox, int X, int Y);
  295. void __fastcall AlgMove(TListBox * AlgListBox, int Source, int Dest);
  296. void __fastcall InitControls();
  297. private:
  298. int NoUpdate;
  299. int FAlgDragSource;
  300. int FAlgDragDest;
  301. int FOptions;
  302. UnicodeString FBeforeDialogPath;
  303. TFSProtocol FFSProtocol;
  304. TSessionData * FSessionData;
  305. TColor FColor;
  306. std::unique_ptr<TPopupMenu> FColorPopupMenu;
  307. void __fastcall LoadSession();
  308. void __fastcall UpdateControls();
  309. void __fastcall SaveSession();
  310. void __fastcall CMDialogKey(TWMKeyDown & Message);
  311. void __fastcall WMHelp(TWMHelp & Message);
  312. int __fastcall LastSupportedFtpProxyMethod();
  313. bool __fastcall SupportedFtpProxyMethod(int Method);
  314. int __fastcall GetSupportedFtpProxyMethod(int Method);
  315. int __fastcall GetSupportedWebDavProxyMethod(int Method);
  316. TProxyMethod __fastcall GetProxyMethod();
  317. int __fastcall GetFtpProxyLogonType();
  318. void __fastcall UpdateNavigationTree();
  319. TSshProt __fastcall GetSshProt();
  320. void __fastcall SetSessionColor(TColor Color);
  321. void __fastcall SessionColorChange(TColor Color);
  322. TTlsVersion __fastcall IndexToTlsVersion(int Index);
  323. int __fastcall TlsVersionToIndex(TTlsVersion TlsVersion);
  324. };
  325. //----------------------------------------------------------------------------
  326. #endif