I have the code for c#
HttpCommandExecutor executor = new HttpCommandExecutor(new Uri("HubURL"), TimeSpan.FromSeconds(120), false)
{
Proxy = new WebProxy(new Uri("http://proxy:port"))
};
IWebDriver driver = new RemoteWebDriver(executor, options.ToCapabilities());
What is equivalent code of this in java for setting proxy to remotewebdriver