Changeset e14a4f0 for apps


Ignore:
Timestamp:
May 5, 2018 10:25:13 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f6273a1
Parents:
543e5bd2
Message:

HTTP Client: Allow SSL to i2p hosts by default

Location:
apps/i2ptunnel/java/src/net/i2p/i2ptunnel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java

    r543e5bd2 re14a4f0  
    372372    /** @since 0.9.14 */
    373373    public static final String PROP_ACCEPT = "i2ptunnel.httpclient.sendAccept";
    374     /** @since 0.9.14 */
     374    /** @since 0.9.14, overridden to true as of 0.9.35 unlesss PROP_SSL_SET is set */
    375375    public static final String PROP_INTERNAL_SSL = "i2ptunnel.httpclient.allowInternalSSL";
     376    /** @since 0.9.35 */
     377    public static final String PROP_SSL_SET = "sslManuallySet";
    376378
    377379    /**
     
    12461248            }
    12471249
     1250            // as of 0.9.35, allowInternalSSL defaults to true, and overridden to true unless PROP_SSL_SET is set
    12481251            if (method.toUpperCase(Locale.US).equals("CONNECT") &&
    12491252                !usingWWWProxy &&
    1250                 !Boolean.parseBoolean(getTunnel().getClientOptions().getProperty(PROP_INTERNAL_SSL))) {
     1253                getTunnel().getClientOptions().getProperty(PROP_SSL_SET) != null &&
     1254                !Boolean.parseBoolean(getTunnel().getClientOptions().getProperty(PROP_INTERNAL_SSL, "true"))) {
    12511255                try {
    12521256                    writeErrorMessage(ERR_INTERNAL_SSL, out, targetRequest, false, destination);
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java

    r543e5bd2 re14a4f0  
    662662    }
    663663
     664    /**
     665     *  As of 0.9.35, default true, and overridden to true unless
     666     *  PROP_SSL_SET is set
     667     */
    664668    public boolean getAllowInternalSSL(int tunnel) {
    665         return getBooleanProperty(tunnel, I2PTunnelHTTPClient.PROP_INTERNAL_SSL);
     669        return getBooleanProperty(tunnel, I2PTunnelHTTPClient.PROP_INTERNAL_SSL, true) ||
     670               !getBooleanProperty(tunnel, I2PTunnelHTTPClient.PROP_SSL_SET, true);
    666671    }
    667672
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java

    r543e5bd2 re14a4f0  
    601601                config.setProperty(TunnelController.PROP_LISTEN_PORT, Integer.toString(_port));
    602602            config.setProperty(TunnelController.PROP_SHARED, _sharedClient + "");
     603            // see I2PTunnelHTTPClient
     604            if (TunnelController.TYPE_HTTP_CLIENT.equals(_type))
     605                _booleanOptions.add(I2PTunnelHTTPClient.PROP_SSL_SET);
    603606            for (String p : _booleanClientOpts)
    604607                config.setProperty(OPT + p, "" + _booleanOptions.contains(p));
     
    760763        I2PTunnelHTTPClient.PROP_REFERER,
    761764        I2PTunnelHTTPClient.PROP_ACCEPT,
    762         I2PTunnelHTTPClient.PROP_INTERNAL_SSL
     765        I2PTunnelHTTPClient.PROP_INTERNAL_SSL,
     766        I2PTunnelHTTPClient.PROP_SSL_SET
    763767        };
    764768    private static final String _booleanServerOpts[] = {
Note: See TracChangeset for help on using the changeset viewer.