Index: src/interface/sitemanager.cpp
===================================================================
--- src/interface/sitemanager.cpp (revision 2099)
+++ src/interface/sitemanager.cpp (working copy)
@@ -1115,6 +1115,12 @@
else
data->m_server.SetEncodingType(ENCODING_AUTO);
+ if (XRCCTRL(*this, "ID_BYPASSPROXY", wxCheckBox)->GetValue())
+ {
+ data->m_server.SetBypassProxy(true);
+ }
+ else
+ data->m_server.SetBypassProxy(false);
return true;
}
@@ -1212,6 +1218,7 @@
XRCCTRL(*this, "ID_HOST", wxTextCtrl)->SetValue(_T(""));
XRCCTRL(*this, "ID_PORT", wxTextCtrl)->SetValue(_T(""));
XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->SetStringSelection(_("FTP"));
+ XRCCTRL(*this, "ID_BYPASSPROXY", wxCheckBox)->SetValue(false);
XRCCTRL(*this, "ID_LOGONTYPE", wxChoice)->SetStringSelection(_("Anonymous"));
XRCCTRL(*this, "ID_USER", wxTextCtrl)->SetValue(_T(""));
XRCCTRL(*this, "ID_PASS", wxTextCtrl)->SetValue(_T(""));
@@ -1258,6 +1265,7 @@
else
XRCCTRL(*this, "ID_PROTOCOL", wxChoice)->SetStringSelection(CServer::GetProtocolName(FTP));
XRCCTRL(*this, "ID_PROTOCOL", wxWindow)->Enable(!predefined);
+ XRCCTRL(*this, "ID_BYPASSPROXY", wxCheckBox)->SetValue(data->m_server.GetBypassProxy());
XRCCTRL(*this, "ID_USER", wxTextCtrl)->Enable(!predefined && data->m_server.GetLogonType() != ANONYMOUS);
XRCCTRL(*this, "ID_PASS", wxTextCtrl)->Enable(!predefined && data->m_server.GetLogonType() == NORMAL || data->m_server.GetLogonType() == ACCOUNT);
Index: src/interface/resources/dialogs.xrc
===================================================================
--- src/interface/resources/dialogs.xrc (revision 2099)
+++ src/interface/resources/dialogs.xrc (working copy)
@@ -788,20 +788,33 @@
wxGROW
+ 5
+ 5
+
+ wxALL|wxGROW
+ 5
+
+
+
+
+ wxTOP|wxBOTTOM|wxGROW
+ 5
+
+ wxVERTICAL
+
+
+ 2
-
- wxTOP|wxBOTTOM|wxGROW
- 5
-
-
-
- wxTOP|wxBOTTOM|wxGROW
- 5
-
-
Index: src/interface/quickconnectbar.cpp
===================================================================
--- src/interface/quickconnectbar.cpp (revision 2099)
+++ src/interface/quickconnectbar.cpp (working copy)
@@ -108,10 +108,26 @@
return;
}
- if (!m_pState->Connect(server, true))
- return;
-
- CRecentServerList::SetMostRecentServer(server);
+ if (event.GetId() == 1)
+ {
+ bool oldBypassProxy = server.GetBypassProxy();
+ server.SetBypassProxy(true);
+ if (!m_pState->Connect(server, true))
+ {
+ server.SetBypassProxy(oldBypassProxy);
+ return;
+ }
+
+ CRecentServerList::SetMostRecentServer(server);
+ server.SetBypassProxy(oldBypassProxy);
+ }
+ else
+ {
+ if (!m_pState->Connect(server, true))
+ return;
+
+ CRecentServerList::SetMostRecentServer(server);
+ }
}
void CQuickconnectBar::OnQuickconnectDropdown(wxCommandEvent& event)
@@ -119,8 +135,9 @@
wxMenu* pMenu = new wxMenu;
// We have to start with id 1 since menu items with id 0 don't work under OS X
- pMenu->Append(1, _("Clear quickconnect bar"));
- pMenu->Append(2, _("Clear history"));
+ pMenu->Append(1, _("Connect bypassing proxy settings"));
+ pMenu->Append(2, _("Clear quickconnect bar"));
+ pMenu->Append(3, _("Clear history"));
pMenu->AppendSeparator();
m_recentServers = CRecentServerList::GetMostRecentServers();
@@ -141,8 +158,10 @@
{
const int id = event.GetId();
if (id == 1)
+ OnQuickconnect(event);
+ else if (id == 2)
ClearFields();
- else if (id == 2)
+ else if (id == 3)
CRecentServerList::Clear();
if (id < 10)
Index: src/interface/xmlfunctions.cpp
===================================================================
--- src/interface/xmlfunctions.cpp (revision 2099)
+++ src/interface/xmlfunctions.cpp (working copy)
@@ -513,6 +513,11 @@
return false;
}
+ if (GetTextElementInt(node, "BypassProxy", false) == 0)
+ server.SetBypassProxy(false);
+ else
+ server.SetBypassProxy(true);
+
return true;
}
@@ -580,6 +585,8 @@
AddTextElement(pElement, "Command", *iter);
}
}
+
+ AddTextElement(node, "BypassProxy", server.GetBypassProxy());
}
void SetTextAttribute(TiXmlElement* node, const char* name, const wxString& value)
Index: src/include/server.h
===================================================================
--- src/include/server.h (revision 2099)
+++ src/include/server.h (working copy)
@@ -71,6 +71,7 @@
int GetTimezoneOffset() const;
enum PasvMode GetPasvMode() const;
int MaximumMultipleConnections() const;
+ bool GetBypassProxy() const;
// Return true if URL could be parsed correctly, false otherwise.
// If parsing fails, pError is filled with the reason and the CServer instance may be left an undefined state.
@@ -112,6 +113,7 @@
// These commands will be executed after a successful login.
const std::vector& GetPostLoginCommands() const { return m_postLoginCommands; }
bool SetPostLoginCommands(const std::vector& postLoginCommands);
+ void SetBypassProxy(bool val);
protected:
void Initialize();
@@ -131,6 +133,7 @@
wxString m_customEncoding;
std::vector m_postLoginCommands;
+ bool m_bypassProxy;
};
#endif
Index: src/engine/server.cpp
===================================================================
--- src/engine/server.cpp (revision 2099)
+++ src/engine/server.cpp (working copy)
@@ -228,6 +228,7 @@
m_encodingType = op.m_encodingType;
m_customEncoding = op.m_customEncoding;
m_postLoginCommands = op.m_postLoginCommands;
+ m_bypassProxy = op.m_bypassProxy;
return *this;
}
@@ -546,6 +547,7 @@
m_maximumMultipleConnections = 0;
m_encodingType = ENCODING_AUTO;
m_customEncoding = _T("");
+ m_bypassProxy = false;
}
bool CServer::SetEncodingType(enum CharsetEncoding type, const wxString& encoding /*=_T("")*/)
@@ -681,3 +683,13 @@
return _T("");
}
+
+void CServer::SetBypassProxy(bool val)
+{
+ m_bypassProxy = val;
+}
+
+bool CServer::GetBypassProxy() const
+{
+ return m_bypassProxy;
+}
Index: src/engine/ftpcontrolsocket.cpp
===================================================================
--- src/engine/ftpcontrolsocket.cpp (revision 2099)
+++ src/engine/ftpcontrolsocket.cpp (working copy)
@@ -524,7 +524,7 @@
pData->loginSequence.clear();
int proxyType = m_pEngine->GetOptions()->GetOptionVal(OPTION_FTP_PROXY_TYPE);
- if (!proxyType)
+ if (!proxyType || server.GetBypassProxy())
{
// User
t_loginCommand cmd = {false, false, user, _T("")};
@@ -4142,7 +4142,7 @@
CFtpLogonOpData* pData = new CFtpLogonOpData;
m_pCurOpData = pData;
- if (m_pEngine->GetOptions()->GetOptionVal(OPTION_FTP_PROXY_TYPE))
+ if (m_pEngine->GetOptions()->GetOptionVal(OPTION_FTP_PROXY_TYPE) && !server.GetBypassProxy())
{
pData->host = m_pEngine->GetOptions()->GetOption(OPTION_FTP_PROXY_HOST);
int pos = pData->host.Find(':');