1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #2094 on hold

proxy server setting ineffect for tortoisehg

illidan_the_modeler
created an issue

The issue reported below are true for TortoiseHG 2.1.1 and 2.3.1.

I don't have a direct Intent connection and I have to use a proxy. I set the proxy server in 'global settings' for my tortoisehg in Windows. And I verfied that the resulted mercurial.ini was correct according to the Mercurial user manual.

I run hg in a DOS window. It claimed that it was using the proxy (as indicated on the 3rd line). Finally it got an error of 'abort: error:'.

{{{ hg --debug clone https://illidan_the_modeler:***@bitbucket.org/illidan_the_modeler/sudoku using https://bitbucket.org/illidan_the_modeler/sudoku proxying through http://172.19.6.47:8080 http auth: user illidan_the_modeler, password *** sending capabilities command }}}

When I tries the same thing with tortoisehg GUI, I carefully checked that the 'Use proxy server' option was enabled. The error info was: URLError: [Errno 10060] command returned code 255

Before I issue the hg command, I had started Wireshark to monitor the outgoing traffic. I found that the traffic was sent to the remote server directly, with the proxy ignored.

{{{ 438 10.054562 10.142.104.141 bitbucket.org TCP 3343 > 443 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 SACK_PERM=1 850 13.016122 10.142.104.141 bitbucket.org TCP 3343 > 443 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 SACK_PERM=1 1063 19.030209 10.142.104.141 bitbucket.org TCP 3343 > 443 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 SACK_PERM=1 1705 31.059953 10.142.104.141 bitbucket.org TCP 3356 > 443 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 SACK_PERM=1 }}}

So I wonder if there's an issue preventing the proxy setting to be effective for tortoisehg.

Comments (15)

  1. Yuya Nishihara

    Is the problem true for all operations, e.g. push, pull, incoming, outgoing, clone ? And does it happen on stand-alone clone dialog (not opened from Workbench window) ?

    I couldn't figure out repro condition.

  2. Yuya Nishihara
    • Version?
    • output of hg config --debug http_proxy

    And please copy the output displayed in TortoiseHg Workbench -> View -> Show Console window. And try running the same command with --debug option.

    Also, if you have any extensions enabled, try without them.

  3. Gianluigi Proserpio

    Hi Yuya thanks for your answer., Here are the informations you requested:

    TortoiseHg version is 3.6.1 with Mercurial-3.6.1, Python-2.7.9, PyQt-4.11.3, Qt-4.8.6.

    hg config --debug http_proxy -> C:\Users\proserpio\mercurial.ini:16: http_proxy.host=172.25.120.13:8080

    I remove the mercurial_keyring extension but the problem remain.

    Console window output with error:

    % hg incoming --quiet --bundle "c:\users\proser~1\appdata\local\temp\thg.n7hfbh\https__bitbucket.org_gianluigiproserpio_hdc2cim_ybvp75.hg" --insecure https://bitbucket.org/gianluigiproserpio/hdc2cim URLError: [Errno 10060] Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato [command returned code 255 Mon Dec 14 08:05:40 2015]

    Console output with --debug:

    % hg incoming --debug --quiet --bundle "c:\users\proser~1\appdata\local\temp\thg.n7hfbh\https__bitbucket.org_gianluigiproserpio_hdc2cim_ybvp75.hg" --insecure https://bitbucket.org/gianluigiproserpio/hdc2cim using https://bitbucket.org/gianluigiproserpio/hdc2cim proxying through http://172.25.120.13:8080 sending capabilities command using auth.bitbucket.org.* for authentication URLError: [Errno 10060] Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato [command returned code 255 Mon Dec 14 08:11:12 2015]

    I'm also uploading the wireshark trafic captured from my workstation (172.25.124.43).

    Gianluigi

  4. Yuya Nishihara

    From the --debug output, Mercurial at least tried to use the specified proxy. Did you see no "CONNECT" request to the proxy server?

    I'm also uploading the wireshark trafic captured from my workstation

    Wireshark dump is likely to contain private data. Be careful to not expose your security information.

  5. Gianluigi Proserpio

    It seems that Tortoise try to directly connect to bitbucket, so there is no "CONNECT" to bitbucket nor to proxy evidence in wireshark. Later on I could see a "CONNECT" to the proxy related to dropbox.

    Thanks for your warning related to security ...

  6. Yuya Nishihara

    I've tried --config http_proxy.host=host:port at work, where I have access to Windows box, and it worked. I've tested with TortoiseHg 3.6.2 x86.

    So I can't tell what's wrong on your machine.

  7. Log in to comment