SiteAdvanced.h 10 KB

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