| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_32,J_CHICKENPOX_73,SPF_PASS |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <4AB0B4FE.2090802@gmail.com> |
| Date: | Wed, 16 Sep 2009 10:50:54 +0100 |
| From: | Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com> |
| User-Agent: | Thunderbird 2.0.0.17 (Windows/20080914) |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: setup.exe: Determine Geographically closest mirror programmatically |
| References: | <bab69ce81346d2fe77608668378c25cc DOT squirrel AT webmail DOT charite DOT de> <4AAFAF04 DOT 6000300 AT cygwin DOT com> <37c66961aeaf7c4b1252db53d4da09ad DOT squirrel AT webmail DOT charite DOT de> <4AAFCDC3 DOT 6070001 AT cygwin DOT com> <d2fd360fefc6e975f8faade677043319 DOT squirrel AT webmail DOT charite DOT de> |
| In-Reply-To: | <d2fd360fefc6e975f8faade677043319.squirrel@webmail.charite.de> |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Dr. Christoph Gille wrote:
>> Closest mirror? I'm not sure what you mean by this. 'setup.exe' does
>> not require this as a setting. Actually, there is no such concept. You
>> need to specify a mirror to work with but you can do that with '-s'.
>
> With each superfluous click I lose a user, so it would be best if setup.exe
> would be run within http://3d-alignment.eu/ without user interaction.
You could very simply compile a custom version of setup.exe for your users
which had a different URL for the mirrors list, pointing to a custom list on
your own server that only had one entry on it for 3d-alignment.eu. (You could
even take advantage of the opportunity to replace the public key embedded in
it with one that you could use for signing on your own server; otherwise your
users will need to run setup.exe using the -X command-line flag to ignore
security, or you'd need to distribute a key file to all your users somehow.)
> I am not a network specialist, but I see two possibilities how I could
> determine the closest cygwin mirror:
>
> (I) I could compare the IP numbers of all mirrors to the IP number of the
> client and make a guess of the geographically closest site. I would use the
> site where the first digits of the IP match best and I would then probe a
> short file to check whether the mirror is indeed working.
>
> (II) This is what I am currently using to determine the fastest database
> mirror for 3D-structures: I fetch a tiny probe file from each database
> mirror and take the one with the shortest respond time. This method is more
> simple but as there are that many cygwin mirrors, I am not sure whether I
> would run into problems.
Just as one further possibility, there's a bit of scripting on the page at
the cygwin website about how to setup your own package server that uses a
utility called 'netselect' to determine which is the fastest server in the
mirrors list:
http://sourceware.org/cygwin-apps/package-server.html
You might (or perhaps might not) find it adaptable to suit your purposes.
> When I have the mirror I would set it with the command line option of
> setup.exe. I think this would work and could be done easily. Do you have
> other ideas?
If you wanted to be really cool, the URL that points to the alternative
mirrors list on your own server can in fact be a CGI script of some kind that
selects a geographically-nearest server based on the client's browser request
headers, and returns a dynamically generated mirrors.lst with one entry
customised just for that user.
> Could you please tell me the URL of the file with the cygwin mirror list?
http://cygwin.com/mirrors.lst
In the setup.exe source code, this is defined in IDS_MIRROR_LST in res.rc.
cheers,
DaveK
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |