Ignore:
Timestamp:
2017-08-14T22:23:04+12:00 (7 years ago)
Author:
ak19
Message:

All the changes that were required to set up multiple proxy servers, one for HTTP, one for HTTPS, one for FTP. Still need to test on Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r31814 r31880  
    14531453        try {// Can throw several exceptions
    14541454            if(Configuration.get("general.use_proxy", true)) {
     1455                // These are Java properties, therefore see
     1456                // https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html
     1457                // https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html
     1458                // https://stackoverflow.com/questions/14243590/proxy-settings-in-java
     1459
     1460                // Not sure what proxyType is. And proxySet ceased to exist since JDK 6 or before
    14551461                System.setProperty("http.proxyType", "4");
    1456                 System.setProperty("http.proxyHost", Configuration.getString("general.proxy_host", true));
    1457                 System.setProperty("http.proxyPort", Configuration.getString("general.proxy_port", true));
    1458                 System.setProperty("http.proxySet", "true");
     1462                System.setProperty("http.proxyHost", Configuration.getString("general.HTTP_proxy_host", true));
     1463                System.setProperty("http.proxyPort", Configuration.getString("general.HTTP_proxy_port", true));
     1464                //System.setProperty("http.proxySet", "true");
     1465               
     1466                System.setProperty("https.proxyHost", Configuration.getString("general.HTTPS_proxy_host", true));
     1467                System.setProperty("https.proxyPort", Configuration.getString("general.HTTPS_proxy_port", true));
     1468
     1469                System.setProperty("ftp.proxyHost", Configuration.getString("general.FTP_proxy_host", true));
     1470                System.setProperty("ftp.proxyPort", Configuration.getString("general.FTP_proxy_port", true));
     1471               
    14591472            } else {
    14601473                System.setProperty("http.proxyHost", "");
    14611474                System.setProperty("http.proxyPort", "");
    1462                 System.setProperty("http.proxySet", "false");
     1475                //System.setProperty("http.proxySet", "false");
     1476                System.setProperty("https.proxyHost", "");
     1477                System.setProperty("https.proxyPort", "");
     1478                System.setProperty("ftp.proxyHost", "");
     1479                System.setProperty("ftp.proxyPort", "");
    14631480            }
    14641481        } catch (Exception error) {
Note: See TracChangeset for help on using the changeset viewer.