Often a counterparty requires that clients connect via a proxy for security reasons. In such cases, one can use OnixS::FIX::Session::proxySettings method to set the HTTP proxy parameters. These parameters will be used during the OnixS::FIX::Session::logonAsInitiator call to set up the proxy tunnel before the Logon exchange.
Example
const std::string SenderCompId = "SenderCompID";
const std::string TargetCompId = "TargetCompID";
const std::string ProxyHost = "192.22.33.1";
const int ProxyPort = 5000;
const std::string ProxyUsername = "Username";
const std::string ProxyPassword = "Password";
const std::string CounterpartyHost = "192.55.66.1";
const int CounterpartyPort = 6000;
Listener listener;
Session initiator(SenderCompId, TargetCompId, Version, &listener);
initiator.logonAsInitiator(CounterpartyHost, CounterpartyPort);
initiator.logout();