]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
index 4b2767ba55a7a3fa3eea773b609e44529f87d63e..0ceaf9dd0b43ff48d1ec0e1792e5ecc98b34553e 100644 (file)
@@ -6,6 +6,84 @@
                 <link>http://people.skolelinux.org/pere/blog/</link>
                 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
        
+       <item>
+               <title>Automatic proxy configuration with Debian Edu / Skolelinux</title>
+               <link>http://people.skolelinux.org/pere/blog/Automatic_proxy_configuration_with_Debian_Edu___Skolelinux.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Automatic_proxy_configuration_with_Debian_Edu___Skolelinux.html</guid>
+                <pubDate>Mon, 13 Feb 2012 23:40:00 +0100</pubDate>
+               <description>&lt;p&gt;New in the Squeeze version of
+&lt;a href=&quot;http://www.skolelinux.org/&quot;&gt;Debian Edu / Skolelinux&lt;/a&gt; is the
+ability for clients to automatically configure their proxy settings
+based on their environment.  We want all systems on the client to use
+the WPAD based proxy definition fetched from &lt;tt&gt;http://wpad/wpad.dat&lt;/tt&gt;, to
+allow sites to control the proxy setting from a central place and make
+sure clients do not have hard coded proxy settings.  The schools can
+change the global proxy setting by editing
+&lt;tt&gt;tjener:/etc/debian-edu/www/wpad.dat&lt;/tt&gt; and the change propagate
+to all Debian Edu clients in the network.&lt;/p&gt;
+
+&lt;p&gt;The problem is that some systems do not understand the WPAD system.
+In other words, how do one get from a WPAD file like this (this is a
+simple one, they can run arbitrary code):&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+function FindProxyForURL(url, host)
+{
+   if (!isResolvable(host) ||
+       isPlainHostName(host) ||
+       dnsDomainIs(host, &quot;.intern&quot;))
+      return &quot;DIRECT&quot;;
+   else
+      return &quot;PROXY webcache:3128; DIRECT&quot;;
+}
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;to a proxy setting in the process environment looking like this:&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+http_proxy=http://webcache:3128/
+ftp_proxy=http://webcache:3128/
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;To do this conversion I developed a perl script that will execute
+the javascript fragment in the WPAD file and return the proxy that
+would be used for
+&lt;tt&gt;&lt;a href=&quot;http://www.debian.org/&quot;&gt;http://www.debian.org/&lt;/a&gt;&lt;/tt&gt;,
+and insert this extracted proxy URL in &lt;tt&gt;/etc/environment&lt;/tt&gt; and
+&lt;tt&gt;/etc/apt/apt.conf&lt;/tt&gt;.  The perl script wpad-extract work just
+fine in Squeeze, but in Wheezy the library it need to run the
+javascript code is &lt;a href=&quot;http://bugs.debian.org/631045&quot;&gt;no longer
+able to build&lt;/a&gt; because the C library it depended on is now a C++
+library.  I hope someone find a solution to that problem before Wheezy
+is frozen.  An alternative would be for us to rewrite wpad-extract to
+use some other javascript library currently working in Wheezy, but no
+known alternative is known at the moment.&lt;/p&gt;
+
+&lt;p&gt;This automatic proxy system allow the roaming workstation (aka
+laptop) setup in Debian Edu/Squeeze to use the proxy when the laptop
+is connected to the backbone network in a Debian Edu setup, and to
+automatically use any proxy present and announced using the WPAD
+feature when it is connected to other networks.  And if no proxy is
+announced, direct connections will be used instead.&lt;/p&gt;
+
+&lt;p&gt;Silently using a proxy announced on the network might be a privacy
+or security problem.  But those controlling DHCP and DNS on a network
+could just as easily set up a transparent proxy, and force all HTTP
+and FTP connections to use a proxy anyway, so I consider that
+distinction to be academic.  If you are afraid of using the wrong
+proxy, you should avoid connecting to the network in question in the
+first place.  In Debian Edu, the proxy setup is updated using dhcp and
+ifupdown hooks, to make sure the configuration is updated every time
+the network setup changes.&lt;/p&gt;
+
+The WPAD system is documented in a
+&lt;a href=&quot;http://tools.ietf.org/html/draft-ietf-wrec-wpad-01&quot;&gt;IETF
+draft&lt;/a&gt; and a
+&lt;a href=&quot;http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol&quot;&gt;Wikipedia
+page&lt;/a&gt; for those that want to learn more.
+</description>
+       </item>
+       
        <item>
                <title>Skolelinux-intervju: Axel Bojer</title>
                <link>http://people.skolelinux.org/pere/blog/Skolelinux_intervju__Axel_Bojer.html</link>
@@ -503,45 +581,5 @@ on the project announcement list.&lt;/p&gt;
 </description>
        </item>
        
-       <item>
-               <title>Fixing an hanging debian installer for Debian Edu</title>
-               <link>http://people.skolelinux.org/pere/blog/Fixing_an_hanging_debian_installer_for_Debian_Edu.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Fixing_an_hanging_debian_installer_for_Debian_Edu.html</guid>
-                <pubDate>Tue, 3 Jan 2012 11:25:00 +0100</pubDate>
-               <description>&lt;p&gt;During christmas, I have been working getting the next version of
-&lt;a href=&quot;http://www.skolelinux.org/&quot;&gt;Debian Edu / Skolelinux&lt;/a&gt; ready
-for release.  The initial problem I looked at was particularly
-interesting.&lt;/p&gt;
-
-&lt;P&gt;The installer would hang at the end when it was doing it
-post-installation configuration, and whatevery I did to try to find
-the cause and fix it always worked while I tested it, but never when I
-integrated it into the installer and ran the installation from
-scratch.  I would try to restart processes, close file descriptors,
-remove or create files, and the installer would always unblock and
-wrap up its tasks.&lt;/p&gt;
-
-&lt;p&gt;Eventually the cause was found.  The kernel was simply running out
-of entropy, causing the Kerberos setup to hang waiting for more.
-Pressing keys was adding entropy to the kernel, and thus all my tries
-to fix the problem worked not because what I was typing to fix it, but
-because I was typing.&lt;/P&gt;
-
-&lt;p&gt;The fix I implemented was to add a background process looking at
-the level of entropy in the kernel (by checking
-/proc/sys/kernel/random/entropy_avail), and if it was too small, the
-installer will flush the kernel file buffers and do &#39;find /&#39; to
-generate some disk IO.  Disk IO generate entropy in the kernel, and is
-one of the few things that can be initated from within the system to
-generate entropy.&lt;/p&gt;
-
-&lt;p&gt;The fix is in
-&lt;a href=&quot;http://wiki.debian.org/DebianEdu/Documentation/Squeeze/Installation&quot;&gt;beta1
-of the Debian Edu/Squeeze&lt;/a&gt; version, and we
-&lt;a href=&quot;http://wiki.debian.org/DebianEdu&quot;&gt;welcome more testers and
-developers&lt;/a&gt;.  We plan to release beta2 this weekend.&lt;/p&gt;
-</description>
-       </item>
-       
         </channel>
 </rss>