mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
Auto execute plugin puttyforward for linux.
При наличии такого плагина: ``` ; SSH (Unix): tunnel putty forward ; Title=[Putty tunnel forward] Command=putty -load "$$TITLE" appliesto=puttyforward Description=Putty forward tunnel from local port. KeyFile= Platform=unix ServerType=postgresql Database=No SetPassword=No ; ``` При попытке подключения к БД если существует конфигурация туннеля описанного в putty то будет проверятся наличие открытого порта на localhost и если он закрыт то запускается выше указанный плагин для организации туннеля.
This commit is contained in:
parent
903fd8ea9e
commit
2cde1c04f4
5 changed files with 88 additions and 9 deletions
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
class frmMain;
|
||||
class pgServer;
|
||||
class pluginUtilityFactory;
|
||||
|
||||
class pgServerFactory : public pgaFactory
|
||||
{
|
||||
|
|
@ -366,6 +367,10 @@ public:
|
|||
void ShowTreeDetail(ctlTree *browser, frmMain *form = 0, ctlListView *properties = 0, ctlSQLBox *sqlPane = 0);
|
||||
void ShowHint(frmMain *form, bool force);
|
||||
void ShowStatistics(frmMain *form, ctlListView *statistics);
|
||||
void SetPuttyTunnel(pluginUtilityFactory *puttytunnel) {
|
||||
puttyTunnel=puttytunnel;
|
||||
}
|
||||
pluginUtilityFactory* GetPuttyTunnel() {return puttyTunnel;}
|
||||
wxString GetHelpPage(bool forCreate) const
|
||||
{
|
||||
return wxT("pg/managing-databases");
|
||||
|
|
@ -448,6 +453,7 @@ public:
|
|||
{
|
||||
sslcompression = b;
|
||||
}
|
||||
|
||||
|
||||
#if defined(HAVE_OPENSSL_CRYPTO) || defined(HAVE_GCRYPT)
|
||||
//SSH Tunnel
|
||||
|
|
@ -560,6 +566,7 @@ private:
|
|||
bool inRecovery, replayPaused;
|
||||
wxString receiveLoc, replayLoc, replayTimestamp;
|
||||
wxDateTime confLoadedSince;
|
||||
pluginUtilityFactory *puttyTunnel=NULL; // if exists putty tunnel for pgServer
|
||||
|
||||
#if defined(HAVE_OPENSSL_CRYPTO) || defined(HAVE_GCRYPT)
|
||||
bool createSSHTunnel();
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ wxString qtTypeIdent(const wxString &value); // add " if necessary
|
|||
bool make_identifier(const wxString &strname, wxString &s, wxString &n, bool islower);
|
||||
wxSize getScreenSizeForPoint(const wxPoint screenPos);
|
||||
void showHelpHtml(wxWindow *parent, const wxString &htmlHelp,wxPoint screenPos, wxSize size);
|
||||
bool isPortOpen(const wxString& host, int port , int timeout_ms);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue