void (@NotNull Command command) { // TODO: This is quite messy logic for determining group for host - either ProxyCallback could be unified with ProxyModule // TODO: or group name resolved in ProxyModule could be saved in Command instance. // TODO: This will be done later after corresponding refactorings. String proxyHostParameter = ContainerUtil.find(command.getParameters(), s -> s.contains("http-proxy-port")); if (!StringUtil.isEmpty(proxyHostParameter) && myUrl != null && myProxyAuthentication != null) { String group = getHostGroup(proxyHostParameter); command.put("--config-option"); command.put(String.format("servers:%s:http-proxy-username=%s", group, myProxyAuthentication.getUserName())); command.put("--config-option"); command.put(String.format("servers:%s:http-proxy-password=%s", group, String.valueOf(myProxyAuthentication.getPassword()))); } }