OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // This proxy script returns a proxy list that encodes the URL that was passed |
| 6 // in. |
| 7 |
| 8 function convertUrlToHostname(url) { |
| 9 // Turn the URL into something that resembles a hostname. |
| 10 var result = encodeURIComponent(url); |
| 11 return result.replace(/%/g, "x"); |
| 12 } |
| 13 |
| 14 function FindProxyForURL(url, host) { |
| 15 return "PROXY " + convertUrlToHostname(url) + ":99"; |
| 16 } |
OLD | NEW |