Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy connection implementation #1706

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

anki2189
Copy link
Member

@anki2189 anki2189 commented Mar 21, 2020

Pull Request Description

This pull request closes #1677

Acceptance Test

  • Building the code with mvn clean install -Dintegration.tests still works.
  • Running mvn spring-boot:run in the strongbox-web-core still starts up the application correctly.
  • Building the code and running the strongbox-distribution from a zip or tar.gz still works.
  • The tests in the strongbox-web-integration-tests still run properly.

Questions

  • Does this pull request break backward compatibility?

    • Yes
    • No
  • Does this pull request require other pull requests to be merged first?

    • Yes, please see #...
    • No
  • Does this require an update of the documentation?

    • Yes, please see strongbox/strongbox-docs#{PR_NUMBER}
    • No

@ghost
Copy link

ghost commented Mar 21, 2020

DeepCode's analysis on #d00d85 found:

  • 0 critical issues. ⚠️ 0 warnings and 1 minor issue. ✔️ 0 issues were fixed.

💬 This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues.


☺️ If you want to provide feedback on our bot, here is how to contact us.

@anki2189
Copy link
Member Author

@strongbox/core-developers : For implementing SOCKS proxy we have to register ConnectionSocketFactory in PoolingHttpClientConnectionManager (https://stackoverflow.com/questions/22937983/how-to-use-socks-5-proxy-with-apache-http-client-4) and we are using single PoolingHttpClientConnectionManager in entire strongbox instance, pls suggest how to achieve/implement this.

One approach is separate PoolingHttpClientConnectionManager for proxy and non-proxy connection.

@@ -1,5 +1,7 @@
package org.carlspring.strongbox.client;

import static org.assertj.core.api.Assertions.assertThat;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can safely revert this change. It just re-orders the import and it's not according to our convention.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -1,5 +1,7 @@
package org.carlspring.strongbox.service.impl;

import static org.assertj.core.api.Assertions.assertThat;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can safely revert this change. It just re-orders the import and it's not according to our convention.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


ProxyServerConfiguration getProxyServerConfiguration()
throws IllegalAccessException,
InvocationTargetException;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cosmetic: Could you please set your IDE to align exceptions? (I've seen this elsewhere across the pull request in methods as well). Thanks! :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carlspring : Pls share the format, I am using the same template available on strongbox documentation page.

@@ -24,15 +25,15 @@
private static final Logger logger = LoggerFactory.getLogger(HttpGetRemoteRepositoryCheckStrategy.class);

@Inject
private ProxyRepositoryConnectionPoolConfigurationService proxyRepositoryConnectionPoolConfigurationService;
private ProxyRepositoryConnectionConfigurationService proxyRepositoryConnectionConfigurationService;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my better understanding: why is this no lnger using the connection pool service configuration?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProxyRepositoryConnectionConfigurationService is a wrapper over ProxyRepositoryConnectionPoolConfigurationService, so both are doing same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement proxy connection support
2 participants