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

Allow HTTP Proxy configuration? #39

Closed
xwjenny opened this issue Oct 27, 2016 · 3 comments
Closed

Allow HTTP Proxy configuration? #39

xwjenny opened this issue Oct 27, 2016 · 3 comments
Assignees

Comments

@xwjenny
Copy link

xwjenny commented Oct 27, 2016

Possible to support to set http_proxy and https_proxy from plugin configuration?

@SeanRoy
Copy link
Owner

SeanRoy commented Oct 29, 2016

Could you be more specific? What are you trying to accomplish?

@xwjenny
Copy link
Author

xwjenny commented Nov 8, 2016

Here is the details:

I am using this plugin from inside company's internal network.

I hope I could explicitly specify HTTP proxy in the plugin configuration:

<groupId>com.github.seanroy</groupId>
<artifactId>lambda-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<protocol>https</protocol>
<proxyHost>a-proxy....net</proxyHost>
<proxyPort>1234</proxyPort>
 ....
<configuration>
...

This configuration will be translated to codes similar like below:

lambdaClient = of(credentials).map(
                credentials -> new AWSLambdaClient(credentials, getClientConfig()).<AWSLambdaClient>withRegion(region))
                .orElse(new AWSLambdaClient(getClientConfig()).withRegion(region));

private ClientConfigurationgetClientConfig() {
        ClientConfiguration clientConfig = new ClientConfiguration();
        clientConfig.setProtocol("https");
        clientConfig.setProxyHost("a-proxy....net");
        clientConfig.setProxyPort(11234);
        return clientConfig;
    }

I tried other options for achieving the same effect, but they did not work out for me. Above codes work fine.

Thanks!

@xwjenny xwjenny changed the title Support Http Proxy? Allow HTTP Proxy configuration? Nov 8, 2016
@SeanRoy SeanRoy self-assigned this Oct 3, 2017
@SeanRoy SeanRoy mentioned this issue Oct 4, 2017
@SeanRoy
Copy link
Owner

SeanRoy commented Oct 4, 2017

@xwjenny I'm really sorry it took me so long to get to this. If you're still there, could you please grab 2.2.9 and test this out? At the moment I don't have time to set up a test proxy to test this functionality.

@SeanRoy SeanRoy closed this as completed Oct 5, 2017
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

No branches or pull requests

2 participants