Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18162] CLI: Implement proxy autodetection from titanium-connection-test in ti setup

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-03-20T18:16:59.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.0.0, Release 4.1.0
ComponentsCLI
Labelsn/a
ReporterTim Poulsen
AssigneeFeon Sua Xin Miao
Created2014-12-09T17:06:20.000+0000
Updated2017-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.

Comments

  1. Tim Poulsen 2015-01-29

    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 choose n, 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 then x 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).
  2. Sujeet Mishra 2015-02-11

    FR passed..
  3. Sujeet Mishra 2015-02-12

    CR done..
  4. Tim Poulsen 2015-02-12

    If FR & CR are done, can you merge [~smishra] and mark this ticket as "passed"?
  5. Sujeet Mishra 2015-02-12

    merged ...
  6. Feon Sua Xin Miao 2015-03-20

    4_0_X: https://github.com/appcelerator/titanium/pull/206
  7. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source