Skip to content

Is DIRECT in wpad supported? #304

@lovetox

Description

@lovetox

We have a wpad.dat file that ends in

"PROXY 2.3.4.5:3128; PROXY 2.3.4.6:3128; DIRECT";

when libproxy resolves it we get in the log

(org.gajim.Gajim:21540): pxbackend-DEBUG: 23:13:14.101: px_manager_get_proxies_sync: url=none://xmpp.company.de:5222 online=1
(org.gajim.Gajim:21540): pxbackend-DEBUG: 23:13:14.101: px_manager_get_proxies_sync: Config[0] = wpad://
(org.gajim.Gajim:21540): pxbackend-DEBUG: 23:13:14.101: px_manager_get_proxies_sync: Proxy[0] = http://2.3.4.5:3128
(org.gajim.Gajim:21540): pxbackend-DEBUG: 23:13:14.117: px_manager_get_proxies_sync: Proxy[1] = http://2.3.4.6:3128

if i look into https://github.com/libproxy/libproxy/blob/main/src/backend/px-manager.c#L475

there seems to be no handling for the DIRECT keyword? Do i read the code correct?

The intention here would be, if the two proxies are not available or not suiteable for the protocol try as last resort direct connection.

We use internally GLib.ProxyResolver, and it does not try the direct method, it only tries the two proxies, our guess from the code in px-mamanger.c px_manager_run_pac is that it does not return direct:// to GLib in this case as an option?

And if the wpad file only contains return DIRECT this could be working by accident, as its not handled currently, the list of proxies would be empty and in this case libproxy adds manually direct:// in https://github.com/libproxy/libproxy/blob/main/src/backend/px-manager.c#L684

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