Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Support for configuring proxies #60

Open
henning-cg opened this issue Jun 16, 2015 · 6 comments
Open

Support for configuring proxies #60

henning-cg opened this issue Jun 16, 2015 · 6 comments

Comments

@henning-cg
Copy link
Contributor

Hi,

in the corporate network here in Spain we have to use a HTTP proxy. Right now this means that after setting up the project environment with oasp4j-ide, you have to manually configure this proxy in:

  • Eclipse
  • Maven
  • npm
  • bower
  • Sencha Cmd

and every other tool which needs internet connection.

I think this would be a nice feature for the environment scripts to configure automatically, although it is not a completely trivial task.

Would you be open for such a feature addition?

@hohwille
Copy link
Member

Eclipse supports the proxy settings of the OS (at least on windows).
On Linux there is IMHO support via env variables (http_proxy_host, http_proxy_port).
With oasp4j-ide we can preconfigure all these things. However, we can not configure this in our standard templates as every user would require different settings.
Please first investigate how to solve this with the general standards of OS.
I have to use a proxy as well and it is working for all these tools OOTB - except sencha cmd that I can not tell as I never used it.

@hohwille
Copy link
Member

So what I am saying is that oasp4j-ide already supports your use-case and the person responsible for maintaining the settings can configure all you need.
But in case you would like to put your specific proxy settings into OASP default settings I would consider this as invalid and close it.

Probably we should first investigate what the actual problem is.

  • What is your OS?
  • Did you configure the proxy properly for your OS?
  • What tools still do not work?

@hohwille
Copy link
Member

In case you are doing a closed project where all team members have the same environment/network you can explicitly configure here:

However the global approach is far better as I assume you never want the different tools to use different proxy-servers.

@henning-cg
Copy link
Contributor Author

@hohwille OS is the corporate Windows 7, configured to use a corporate proxy with authentication via Internet Options of IE and via HTTP_PROXY and HTTPS_PROXY env variables.

None of the following works OOTB:

  • Eclipse (although it seems to load the system configuration when using the "native" option, it simply does not work until you switch to "Manual" and enter the proxy details)
  • Maven (have to configure the proxy manually in settings.xml as you described above)
  • Sencha Cmd (which according to Sencha supports the same auto-disovery of system proxy as Eclipse, but as Eclipse doesn't work neither)

It is true that this could be supplied via project-specific settings, but I still see this as problematic for international teams, and also for the first experience with the OASP sample.

An alternative could be to offer proxy configuration on top of create-or-update-workspace, or as a separate script, which prompts the user if she wants to configure a proxy, and if so, asks for the proxy details.

@hohwille
Copy link
Member

Very interesting is that here in Germany it works OOTB. Seems some setting is different in Spain.

We should use the standardized env variables such as http_proxy_host and http_proxy_port.
If not present on global level, users can also define them in variables-customized (but at least only in one place).
Then we could create config templates that configure the proxy based on that variables.
However, one remaining problem is that users that have no proxy at all (direct internet connection) and have these variables unset would end up with settings such as ${env.http_proxy_host}:${env.http_proxy_port} that will not work. Also I switch locations and find it very inconvenient to toggle proxies (e.g. when chaning from office to train with mobile connection).
So first we should further investigate why it is working as desired here in Germany and fails OOTB in your location.

@hohwille
Copy link
Member

IMHO we are using this approach in Germany:
https://de.wikipedia.org/wiki/Proxy_Auto-Config

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

No branches or pull requests

2 participants