[TIMOB-18162] CLI: Implement proxy autodetection from titanium-connection-test in ti setup
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-03-20T18:16:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 4.0.0, Release 4.1.0 |
Components | CLI |
Labels | n/a |
Reporter | Tim Poulsen |
Assignee | Feon Sua Xin Miao |
Created | 2014-12-09T17:06:20.000+0000 |
Updated | 2017-03-16T22:22:54.000+0000 |
Description
The https://github.com/appcelerator/titanium-connection-test project automatically detects the proxy server configuration, if any is in use. This ticket is to implement those functions into the CLI. Auto-detection would augment the existing CLI network configuration functionality whereby users manually configure their proxy server settings.
General plan: developer would run
ti setup
and choose Network. After selecting "yes" that they are behind a proxy, the CLI would attempt to detect the proxy settings and present them to the user for confirmation. If values are correct, user should be able to just accept defaults. If incorrect, values entered by the user are what is saved and used by the CLI.
https://github.com/appcelerator/titanium/pull/184 This needs some careful review and input on the logic. A system could have more than one proxy configured (i.e. one for http and one for https) and could support multiple interfaces (wired & wifi for example). Our CLI supports only one proxy address and assumes all traffic will go through it. With that in mind, my code favors the first interface found, favors https over http, and in the case of OS X, favors proxies configured in the shell environment over those configured in the OS X Network settings applet. On Windows and Linux, only proxies listed in the shell environment are used. Again, https is favored over http. FR steps on OS X: 1. Open System Preferences, choose Network. Select your active network connection (e.g. Wi-Fi). Click Advanced. Click Proxies. Check Secure Web Proxy (HTTPS) and enter a URL and port into the boxes. Click OK. Click Apply. 2. Run
ti setup
and choosen
, enter "yes" when prompted if you're behind a proxy. The suggested address should be the one you entered in System Preferences. Press Enter twice thenx
to finish. 3. Edit your ~/.titanium/config.json file to remove the CLI "httpProxyServer" key (can't do this through ti setup because of TIMOB-18138) 4. Using System Preferences, remove the proxy (uncheck Secure Web Proxy).FR passed..
CR done..
If FR & CR are done, can you merge [~smishra] and mark this ticket as "passed"?
merged ...
4_0_X: https://github.com/appcelerator/titanium/pull/206
Closing ticket as fixed.