Skip to content

custom proxy factories not effective when system proxy is set #65045

@JanKirchhoff

Description

@JanKirchhoff

Creating a custom proxy factory is not effective when a system proxy is set.
This is an issue when you need to use a special proxy e.g. to get access to a web ressource that is not available via the system proxy.

It appears that this happens due to the fact that

if ( !systemproxies.isEmpty() )

is executed before

if ( !proxies.isEmpty() )

which would return an inserted proxy.

for ( QNetworkProxyFactory *f : constProxyFactories )
{
QList<QNetworkProxy> systemproxies = QNetworkProxyFactory::systemProxyForQuery( query );
if ( !systemproxies.isEmpty() )
return systemproxies;
QList<QNetworkProxy> proxies = f->queryProxy( query );
if ( !proxies.isEmpty() )
return proxies;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions