Changeset 82b1eb7


Ignore:
Timestamp:
Oct 6, 2013 4:39:30 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
6bb1505d
Parents:
4bd27ea
Message:
  • Update:
    • Check proxy setting before calling runner for method
File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/update/UpdateHandler.java

    r4bd27ea r82b1eb7  
    55
    66import net.i2p.router.RouterContext;
     7import net.i2p.router.web.ConfigUpdateHandler;
    78import net.i2p.update.*;
    89import static net.i2p.update.UpdateType.*;
     
    4142    public UpdateTask update(UpdateType type, UpdateMethod method, List<URI> updateSources,
    4243                             String id, String newVersion, long maxTime) {
     44        boolean shouldProxy = _context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY);
    4345        if ((type != ROUTER_SIGNED && type != ROUTER_SIGNED_SU3) ||
    44            ( method != HTTP && method != HTTP_CLEARNET && method != HTTPS_CLEARNET) ||
     46            (shouldProxy && method != HTTP) ||
     47            ((!shouldProxy) && method != HTTP_CLEARNET && method != HTTPS_CLEARNET) ||
    4548            updateSources.isEmpty())
    4649            return null;
Note: See TracChangeset for help on using the changeset viewer.