3

It seems that each time I try to update/install new packages, the MiKTeX update wizard will internally first connect to http://api.miktex.org/Repository.asmx.

Is it possible to skip this step? It's really slow for me to connect internationally but would be much much faster since lots of mirrors within country are available.

Or is there any trick to use proxy only for this http://api.miktex.org/Repository.asmx URL but not mirrors I will connect to?

2
  • 3
    I can't see this behaviour. miktex connects to this ip only if I use the option "use the nearest repository" in the update manager. But you can always download the packages from a CTAN mirror with some other means in a folder and then use this folder as local repository for updates and installations. This will need no online connection at all. Commented Apr 28, 2013 at 10:15
  • Welcome to TeX.sx! Commented Apr 28, 2013 at 16:38

1 Answer 1

3

Third version in reaction to comment (actually off-topic for TeX.SX in my opinion):

For selective connection settings you can install a local proxy server. I never needed one, so I cannot say anything about these, but well-known, renowned examples are Squid and Proxomitron (if you are by any chance German: Der Proxomitron - Deutsche Distribution).


Second version:

I would actually recommend not to change anything, but I see only one way without any guarantee that it works, in fact there is a high chance, that this breaks the whole update process (edit: yes, confirmed by wlnirvana in comment below):

  • Go to C:\Windows\System32\drivers\etc\. Make sure you have there writing rights.
  • Make a safe copy of file hosts.
  • Open this file with a text editor and add this line to the end:

    127.0.0.1    api.miktex.org
    

    Starting with # you can add a comment for explanation.

  • Save the file.

Then, every request to api.miktex.org goes to your local host, i.e. your computer, instead.


First wrong version, just written for expression of what was written in comment:

What Ulrike wrote – do not choose the option “Use the nearest package repository.”, but one of the two other options in update dialogue, and MiKTeX will directly connect to the chosen mirror:

MiKTeX update dialogue window with options highlighted

5
  • I do use the two options you mentioned above, however I think it probably still connects to that URL first because I see it when I use GoAgent to get international internet access...
    – wlnirvana
    Commented Apr 29, 2013 at 1:54
  • @wlnirvana: I used tcpview from the sysinternal suite and couldn't see any connection (beside the connection to the repository itself) if I use a fix repository. Commented Apr 29, 2013 at 7:37
  • @UlrikeFischer After using of Wireshark I must unfortunately confirm wlnirvana’s observation. I yesterday just wanted to express, what you’ve written in your comment (hence set in community wiki), and didn’t test myself (first had to install Wireshark).
    – Speravir
    Commented Apr 29, 2013 at 20:35
  • @Speravir Is there any way to use a proxy, say 127.0.0.1:9999, only for this URL while others are not affected?
    – wlnirvana
    Commented Apr 30, 2013 at 5:26
  • @Speravir Unfortunately modifying hosts doesn't help solving this problem. Maybe Miktex connects to the server to do some verification stuff :(
    – wlnirvana
    Commented Apr 30, 2013 at 12:13

Not the answer you're looking for? Browse other questions tagged .