unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs and proxy on w32
@ 2005-07-22 18:47 Lennart Borgman
  2005-07-22 21:55 ` Jason Rumney
  0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2005-07-22 18:47 UTC (permalink / raw)


I am trying to understand how to get url proxy to work with Emacs on 
w32. Is it expected to work currently? I can not get it to work.

The only reasonable way to get it to work is perhaps to use winsock, but 
I am not sure. Could someone with more knowledge comment on this please?

Is Emacs on w32 currently using winsock for urls?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-22 18:47 Emacs and proxy on w32 Lennart Borgman
@ 2005-07-22 21:55 ` Jason Rumney
  2005-07-22 22:07   ` Lennart Borgman
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2005-07-22 21:55 UTC (permalink / raw)
  Cc: Emacs Devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> Is Emacs on w32 currently using winsock for urls?

What else would it use? Our own socket layer?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-22 21:55 ` Jason Rumney
@ 2005-07-22 22:07   ` Lennart Borgman
  2005-07-22 22:29     ` Jason Rumney
  0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2005-07-22 22:07 UTC (permalink / raw)
  Cc: Emacs Devel

Jason Rumney wrote:

>Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>  
>
>>Is Emacs on w32 currently using winsock for urls?
>>    
>>
>
>What else would it use? Our own socket layer?
>  
>
Thanks Jason, but maybe I was not explicit enough. My main (implicit) 
question was why I have to specify an URL proxy server to Emacs today on 
w32. I do not fully understand how these things work. But I guess 
winsock knows about the proxy servers and how to handle proxy for a 
specific URL?

It seems to be very difficult to handle URL proxy if not winsock does 
not automatically find and use the proxy server.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-22 22:07   ` Lennart Borgman
@ 2005-07-22 22:29     ` Jason Rumney
  2005-07-22 22:39       ` Lennart Borgman
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2005-07-22 22:29 UTC (permalink / raw)
  Cc: Emacs Devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> Thanks Jason, but maybe I was not explicit enough. My main (implicit)
> question was why I have to specify an URL proxy server to Emacs today
> on w32. I do not fully understand how these things work. But I guess
> winsock knows about the proxy servers and how to handle proxy for a
> specific URL?

Winsock knows nothing about proxy servers or high level protocols like
HTTP. It is the Windows perversion of the BSD socket API.
 
> It seems to be very difficult to handle URL proxy if not winsock does
> not automatically find and use the proxy server.

Why should it be difficult? You configure it, just like in any other
program that uses proxies. Unfortunately Emacs does not have an
ECMAscript implementation, so pointing it at an auto configuration
script is not going to be an option like it is with modern
webbrowsers.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-22 22:29     ` Jason Rumney
@ 2005-07-22 22:39       ` Lennart Borgman
  2005-07-22 22:45         ` Jason Rumney
  0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2005-07-22 22:39 UTC (permalink / raw)
  Cc: Emacs Devel

Jason Rumney wrote:

>Winsock knows nothing about proxy servers or high level protocols like
>HTTP. It is the Windows perversion of the BSD socket API.
> 
>  
>
>>It seems to be very difficult to handle URL proxy if not winsock does
>>not automatically find and use the proxy server.
>>    
>>
>
>Why should it be difficult? You configure it, just like in any other
>program that uses proxies. Unfortunately Emacs does not have an
>ECMAscript implementation, so pointing it at an auto configuration
>script is not going to be an option like it is with modern
>webbrowsers.
>  
>
I hoped that winsock knew how to handle the ECMAscripts, but you mean 
that is not the case? So any application that wants to go through a 
proxy server must be able to retrieve and execute ECMAscripts itself?

Well, I feared this, but I am still a bit surprised. Has anyone done a 
general solution for this (when there is no web-browser involved)? What 
does the commercial solutions do?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-22 22:39       ` Lennart Borgman
@ 2005-07-22 22:45         ` Jason Rumney
  2005-07-22 22:50           ` Lennart Borgman
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2005-07-22 22:45 UTC (permalink / raw)
  Cc: Emacs Devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> I hoped that winsock knew how to handle the ECMAscripts, but you mean
> that is not the case? So any application that wants to go through a
> proxy server must be able to retrieve and execute ECMAscripts itself?

No. You can configure proxies manually, like the good old days.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-22 22:45         ` Jason Rumney
@ 2005-07-22 22:50           ` Lennart Borgman
  2005-07-23 14:08             ` Benjamin Riefenstahl
  0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2005-07-22 22:50 UTC (permalink / raw)
  Cc: Emacs Devel

Jason Rumney wrote:

>Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>  
>
>>I hoped that winsock knew how to handle the ECMAscripts, but you mean
>>that is not the case? So any application that wants to go through a
>>proxy server must be able to retrieve and execute ECMAscripts itself?
>>    
>>
>
>No. You can configure proxies manually, like the good old days.
>  
>
But how do you get the name of the proxy server to use for a specif URL 
then? Don't you have to find the ECMAscript and execute it?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-22 22:50           ` Lennart Borgman
@ 2005-07-23 14:08             ` Benjamin Riefenstahl
  2005-07-23 22:39               ` Lennart Borgman
  0 siblings, 1 reply; 12+ messages in thread
From: Benjamin Riefenstahl @ 2005-07-23 14:08 UTC (permalink / raw)
  Cc: Emacs Devel, Jason Rumney

Hi Lennart,


Lennart Borgman writes:
> But how do you get the name of the proxy server to use for a specif
> URL then?

You don't.  That is unless you write your own script in ELisp.

> Don't you have to find the ECMAscript and execute it?

Javascript/ECMAscript is a feature of some browsers.  It is *not* a
feature of all those other programs that can otherwise do HTTP fine,
and even a fair number of browsers don't have it.  If you want to
seriously support more than IE and Mozilla, Javascript proxy scripts
are useless.


benny

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-23 14:08             ` Benjamin Riefenstahl
@ 2005-07-23 22:39               ` Lennart Borgman
  2005-07-23 23:01                 ` Jason Rumney
  0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2005-07-23 22:39 UTC (permalink / raw)
  Cc: Emacs Devel, Jason Rumney

Benjamin Riefenstahl wrote:

>Hi Lennart,
>
>
>Lennart Borgman writes:
>  
>
>>But how do you get the name of the proxy server to use for a specif
>>URL then?
>>    
>>
>
>You don't.  That is unless you write your own script in ELisp.
>
>  
>
>>Don't you have to find the ECMAscript and execute it?
>>    
>>
>
>Javascript/ECMAscript is a feature of some browsers.  It is *not* a
>feature of all those other programs that can otherwise do HTTP fine,
>and even a fair number of browsers don't have it.  If you want to
>seriously support more than IE and Mozilla, Javascript proxy scripts
>are useless.
>  
>
Thanks Benny,

I did not believe it was such a mess. I did expect it to be something 
that the OS provided. I just thought that I could not find it.

While looking more at this I found that MS actually are providing an API 
(WinHttpGetProxyForUrl) for this now on XP and W2k. This should perhaps 
be rather simple to call on w32 to give Emacs the possibility to handle 
HTTP proxies.

However of course we want Emacs to have this power on GNU/Linux too! I 
believe that GNU/Linux should benefit from having an API like 
WinHttpGetProxyForUrl. Maybe it does have it already? Otherwise are not 
the capabilities for this in the Mozilla code? Are there code that code 
be copied to GNU/Linux perhaps? (Where should a suggestion like this go?)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-23 22:39               ` Lennart Borgman
@ 2005-07-23 23:01                 ` Jason Rumney
  2005-07-23 23:22                   ` Lennart Borgman
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2005-07-23 23:01 UTC (permalink / raw)
  Cc: Benjamin Riefenstahl, Emacs Devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> I did not believe it was such a mess.

It's not a mess. Although it is theoretically possible to write
complicated autoproxy scripts that use a different proxy for different
hosts, in practice all anyone ever uses is a single proxy and a list
of no-proxy hosts.

> While looking more at this I found that MS actually are providing an
> API (WinHttpGetProxyForUrl) for this now on XP and W2k.

It is not an OS API, it is an Internet Explorer API, and the first
parameter is a handle to an open "INTERNET_SESSION", created by
another function in the same API, so if you start down that road
you'll end up having to continue, and that would restrict the
networking capabilities of Emacs to what is supported by IE. Not to
mention that IE is not Free, and thus unsuitable to build Free
software on top of.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-23 23:01                 ` Jason Rumney
@ 2005-07-23 23:22                   ` Lennart Borgman
  2005-07-24 16:35                     ` Jason Rumney
  0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2005-07-23 23:22 UTC (permalink / raw)
  Cc: Benjamin Riefenstahl, Emacs Devel

Jason Rumney wrote:

>Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>  
>
>>I did not believe it was such a mess.
>>    
>>
>
>It's not a mess. Although it is theoretically possible to write
>complicated autoproxy scripts that use a different proxy for different
>hosts, in practice all anyone ever uses is a single proxy and a list
>of no-proxy hosts.
>  
>
How does one find out this single proxy and the list of no-proxy hosts 
then? Is not that complicated procedure with perhaps an ECMAscript to 
call required?

>  
>
>>While looking more at this I found that MS actually are providing an
>>API (WinHttpGetProxyForUrl) for this now on XP and W2k.
>>    
>>
>
>It is not an OS API, it is an Internet Explorer API, and the first
>parameter is a handle to an open "INTERNET_SESSION", created by
>another function in the same API, so if you start down that road
>you'll end up having to continue, and that would restrict the
>networking capabilities of Emacs to what is supported by IE. Not to
>mention that IE is not Free, and thus unsuitable to build Free
>software on top of.
>  
>
I do not understand the difference between an OS and and IE API. Could 
you explain? There is a page about WinHTTP that does not seem to make 
such difference between WinINet and WinHTTP:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winhttp/http/about_winhttp.asp

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Emacs and proxy on w32
  2005-07-23 23:22                   ` Lennart Borgman
@ 2005-07-24 16:35                     ` Jason Rumney
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Rumney @ 2005-07-24 16:35 UTC (permalink / raw)
  Cc: Benjamin Riefenstahl, Emacs Devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> How does one find out this single proxy and the list of no-proxy hosts
> then? Is not that complicated procedure with perhaps an ECMAscript to
> call required?

Ask the person responsible for your network.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-07-24 16:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-22 18:47 Emacs and proxy on w32 Lennart Borgman
2005-07-22 21:55 ` Jason Rumney
2005-07-22 22:07   ` Lennart Borgman
2005-07-22 22:29     ` Jason Rumney
2005-07-22 22:39       ` Lennart Borgman
2005-07-22 22:45         ` Jason Rumney
2005-07-22 22:50           ` Lennart Borgman
2005-07-23 14:08             ` Benjamin Riefenstahl
2005-07-23 22:39               ` Lennart Borgman
2005-07-23 23:01                 ` Jason Rumney
2005-07-23 23:22                   ` Lennart Borgman
2005-07-24 16:35                     ` Jason Rumney

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).