@@ -0,0 +1,2137 @@
+package com.redhat.ceylon.common.test;%0A%0Aimport java.io.File;%0Aimport java.io.InputStream;%0Aimport java.net.MalformedURLException;%0Aimport java.net.URL;%0Aimport java.net.URLConnection;%0A%0Aimport com.redhat.ceylon.common.Authentication;%0Aimport com.redhat.ceylon.common.CeylonConfig;%0Aimport com.redhat.ceylon.common.ConfigParser;%0Aimport com.redhat.ceylon.common.Proxies;%0Aimport com.redhat.ceylon.common.Proxies.Proxy;%0A%0Apublic class ProxyTool %7B%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        if (args.length != 3) %7B%0A            usage(%22Wrong number of arguments%22);%0A        %7D%0A        String mode = args%5B0%5D;%0A        %0A        File configFile = new File(args%5B1%5D);%0A        if (!configFile.exists()) %7B%0A            usage(%22Config file doesn't exist%22);%0A            return;%0A        %7D%0A        %0A        final URL url; %0A        try %7B%0A            url  = new URL(args%5B2%5D);%0A        %7D catch (MalformedURLException e) %7B%0A            usage(%22Malformed URL%22);%0A            return;%0A        %7D%0A        %0A        CeylonConfig config = ConfigParser.loadConfigFromFile(configFile);%0A        Authentication auth = Authentication.fromConfig(config);%0A        Proxy proxy = Proxies.withConfig(config).getProxy();%0A        final URLConnection conn;%0A        switch (mode)%7B%0A        case %22proxy%22:%0A            java.net.Proxy netProxy = auth.getProxy();%0A            conn = url.openConnection(netProxy);%0A            break;%0A        case %22install%22:%0A            auth.installProxy();%0A            conn = url.openConnection();%0A            break;%0A        default:%0A            throw new RuntimeException(%22Unsupported mode%22);%0A        %7D%0A        %0A        InputStream in = conn.getInputStream();%0A        try %7B%0A            int ch = in.read();%0A            while (ch != -1) %7B%0A                System.out.append((char)ch);%0A                ch = in.read();%0A            %7D%0A        %7D finally %7B%0A            in.close();%0A        %7D%0A        %0A    %7D%0A%0A    private static void usage(String error) %7B%0A        if (error != null) %7B%0A            System.err.println(error);%0A        %7D%0A        System.err.println(%22Expect 3 arguments: proxy%7Cinstall %3Cconfigfile%3E %3Curl%3E%22);%0A        System.exit(1);%0A    %7D%0A    %0A%7D%0A

Add a simple tool for manual testing of the Proxy configuration