{"action":"created","issue":{"url":"https://api.github.com/repos/curl/curl/issues/977","repository_url":"https://api.github.com/repos/curl/curl","labels_url":"https://api.github.com/repos/curl/curl/issues/977/labels{/name}","comments_url":"https://api.github.com/repos/curl/curl/issues/977/comments","events_url":"https://api.github.com/repos/curl/curl/issues/977/events","html_url":"https://github.com/curl/curl/pull/977","id":172667460,"number":977,"title":"Add libproxy support","user":{"login":"dwmw2","id":911239,"avatar_url":"https://avatars.githubusercontent.com/u/911239?v=3","gravatar_id":"","url":"https://api.github.com/users/dwmw2","html_url":"https://github.com/dwmw2","followers_url":"https://api.github.com/users/dwmw2/followers","following_url":"https://api.github.com/users/dwmw2/following{/other_user}","gists_url":"https://api.github.com/users/dwmw2/gists{/gist_id}","starred_url":"https://api.github.com/users/dwmw2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwmw2/subscriptions","organizations_url":"https://api.github.com/users/dwmw2/orgs","repos_url":"https://api.github.com/users/dwmw2/repos","events_url":"https://api.github.com/users/dwmw2/events{/privacy}","received_events_url":"https://api.github.com/users/dwmw2/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/curl/curl/labels/connecting%20&%20proxies","name":"connecting & proxies","color":"c2e0c6"},{"url":"https://api.github.com/repos/curl/curl/labels/next-feature-window","name":"next-feature-window","color":"f9ecb3"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-23T10:45:08Z","updated_at":"2016-09-19T09:14:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/curl/curl/pulls/977","html_url":"https://github.com/curl/curl/pull/977","diff_url":"https://github.com/curl/curl/pull/977.diff","patch_url":"https://github.com/curl/curl/pull/977.patch"},"body":"This adds optional support for using libproxy to determine which proxy to use for a given URL.\r\n\r\nThe original libproxy has evolved into a C++ monstrosity which potentially loads a JavaScript interpreter into the address space of anything which uses it... but the API is clean and simple:\r\nhttps://github.com/libproxy/libproxy/blob/master/libproxy/proxy.h\r\n\r\nThe PacRunner dæmon provides a service where you can simply ask it, over D-Bus, which proxy to use for a given URL. Not only does it have a plugin for the original libproxy, but it also provides its own replacement libproxy implementation which does *nothing* but field the call to PacRunner.\r\n\r\nI am mentoring a Google Summer of Code project this year which is fixing NetworkManager to pick up proxy information from DHCP, VPN servers and other sources, and to allow it to be an explicit part of per-network configuration — and to poke it into PacRunner appropriately.\r\n\r\nThus the expectation will be that asking libproxy should *consistently* give correct answers. Once that's true, I hope to change Linux distribution packaging guidelines to suggest that packaged applications *should* be using libproxy's results (or at least PacRunner's results) by default.\r\n\r\nThis implements libproxy support for curl because it seems like the more generic option, rather than talking to PacRunner directly over D-Bus. This is just the basic functionality; we need to look at how we make it accessible from the curl command line tool, and/or enable it by default."},"comment":{"url":"https://api.github.com/repos/curl/curl/issues/comments/247944885","html_url":"https://github.com/curl/curl/pull/977#issuecomment-247944885","issue_url":"https://api.github.com/repos/curl/curl/issues/977","id":247944885,"user":{"login":"bagder","id":177011,"avatar_url":"https://avatars.githubusercontent.com/u/177011?v=3","gravatar_id":"","url":"https://api.github.com/users/bagder","html_url":"https://github.com/bagder","followers_url":"https://api.github.com/users/bagder/followers","following_url":"https://api.github.com/users/bagder/following{/other_user}","gists_url":"https://api.github.com/users/bagder/gists{/gist_id}","starred_url":"https://api.github.com/users/bagder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bagder/subscriptions","organizations_url":"https://api.github.com/users/bagder/orgs","repos_url":"https://api.github.com/users/bagder/repos","events_url":"https://api.github.com/users/bagder/events{/privacy}","received_events_url":"https://api.github.com/users/bagder/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T09:14:32Z","updated_at":"2016-09-19T09:14:32Z","body":"I've updated the patch slightly to pass all tests: [0001-proxy-add-libproxy-support.patch](https://github.com/curl/curl/files/479599/0001-proxy-add-libproxy-support.patch.txt)\r\n\r\nI'm a concerned about:\r\n\r\n1. There is no proper documentation for the libproxy API accessible. It makes me not really trust the library. It seems to live in a stealth/\"pre-official API\" mode?\r\n2. The fact that we call `free()` on data returned by the libproxy library might imply that this isn't working properly on windows? (where different memory models in different components are common) - which goes back to the trustworthiness of libproxy. Is libproxy intended only for *nix?\r\n3. The use a of a global variable in this implementation seems to me it might not be thread-safe? What exactly is held in that global and why not keep it per-easy-handle?\r\n"}}
{"actor":{"display_login":"bagder"}}