diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Repository/ComposerRepository.php
+++ b/src/Composer/Repository/ComposerRepository.php
@@ -584,6 +584,11 @@ class ComposerRepository extends ArrayRepository
             $filename = $this->baseUrl.'/'.$filename;
         }
 
+        // url-encode $ signs in URLs as bad proxies choke on them
+        if ($pos = strpos($filename, '$')) {
+            $filename = substr($filename, 0, $pos) . '%24' . substr($filename, $pos+1);
+        }
+
         $retries = 3;
         while ($retries--) {
             try {
URL-encode dollar signs to work around bad proxy failures