• Version 1.15.2
Show / Hide Table of Contents

Establishing FIX Connection via Proxy

Use the Proxy settings to establish the FIX Connection via a proxy server.

The Engine will use these settings during the LogonAsInitiator(string, int, int, bool, IMessage, bool) call to set up the proxy tunnel.

The Engine supports Web and SOCKS proxies. To select the proxy type, use the ProxyType property.

Example

const string SenderCompId = "SenderCompID";
const string TargetCompId = "TargetCompID";
const ProtocolVersion Version = ProtocolVersion.Fix44;

using Session initiator = new Session(TargetCompId, SenderCompId, Version);

initiator.Proxy.ProxyType = ProxyType.HTTP;
initiator.Proxy.Host = "192.22.33.1";
initiator.Proxy.Port = 5000;

// If the username and password are required:
initiator.Proxy.Username = "Username";
const string ProxyPassword = "Password";
Array.ForEach(ProxyPassword.ToCharArray(), initiator.Proxy.Password.AppendChar);

const string CounterpartyHost = "192.55.66.1";
const int CounterpartyPort = 6000;

// Establishes the proxy tunnel and then performs the usual Logon message exchange.
initiator.LogonAsInitiator(CounterpartyHost, CounterpartyPort);

// Message exchange and processing logic.

initiator.Logout();
In this article
Back to top Copyright © Onix Solutions.
Generated by DocFX