summaryrefslogtreecommitdiff
path: root/libproxy/modules
Commit message (Collapse)AuthorAgeFilesLines
* config_kde: Use kf5-config instead of qtpathsMalte S. Stretz2021-11-221-1/+1
| | | | | | | | qtpaths is a developer tool which is not guaranteed to exist on all KDE installations (notably KDE neon). If it doesn't exist, the cache isn't used at all. The equivalent to kde4-config is kf5-config, let's use that.
* pacrunner: Ensure hostname is null-terminatedZhaofeng Li2021-07-133-2/+7
|
* Add Duktape pacrunner moduleZhaofeng Li2021-07-131-0/+138
|
* config_envvar: Add environment variable for pacrunner debuggingZhaofeng Li2021-06-131-0/+6
|
* Merge pull request #131 from TechSmith/vs2019buildableDominique Leuenberger2020-09-101-1/+7
|\ | | | | Enable building in Visual Studio 2019 without mingw.
| * Use windows pipe open and close on win32Ross Porter2020-09-031-1/+7
| | | | | | | | | | | | Following the pattern found here: https://github.com/libproxy/libproxy/blob/d6990f4aaab4b947a490ab1abfd9ac6e62d66d7a/libproxy/url.cpp#L23, This commit uses the _popen and _pclose functions from windows `stdio.h` (included in the existing code via `<cstdio>` on windows builds). - https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/popen-wpopen?view=vs-2019 - https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/pclose?view=vs-2019
* | Merge pull request #129 from mcatanzaro/mcatanzaro/#127Dominique Leuenberger2020-09-1011-17/+17
|\ \ | | | | | | Remove dynamic exception specifications
| * | Remove dynamic exception specificationsMichael Catanzaro2020-08-1211-17/+17
| |/ | | | | | | | | | | | | | | | | C++98 called and it wants its dynamic exception specifications back! We'd better comply. https://en.cppreference.com/w/cpp/language/except_spec Fixes #127
* | Parse the windows bypass listRoss Porter2020-09-031-1/+5
|/ | | | | Converts the windows registry bypass list from semi-colon delimited to comma delimited Returns the full list of bypass urls
* Merge pull request #118 from smcv/mozjs-freed-stringDominique Leuenberger2020-06-021-7/+4
|\ | | | | mozjs: Avoid use-after-free
| * mozjs: Avoid use-after-freeSimon McVittie2020-05-011-7/+4
| | | | | | | | | | | | | | | | | | If we don't assign the temporary std::string returned by url_.to_string() to a variable, then it immediately goes out of scope and is freed, resulting in the result of c_str() pointing into freed memory. This works about as well as you would expect. Signed-off-by: Simon McVittie <smcv@debian.org>
* | Merge pull request #117 from smcv/gsettings-wait-for-initialDominique Leuenberger2020-06-022-5/+14
|\ \ | |/ |/| Fix race conditions in GSettings backend
| * gsettings: Wait for all configuration updatesSimon McVittie2020-05-011-1/+1
| | | | | | | | | | | | | | | | If we haven't polled the pxgsettings helper for a while, there might be more proxy configuration updates in the pipe than will fit in a single read() call. Signed-off-by: Simon McVittie <smcv@debian.org>
| * gsettings: Always read at least the initial values of all keysSimon McVittie2020-05-012-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the gsettings (gnome3) module would wait until it had read at least one key/value pair for each GSettings schema requested on the command line. However, GSettings schemas often contain more than one key. With a relatively elaborate proxy configuration, we don't necessarily read all of them in one read() from the pipe, resulting in the full configuration not being read until later - but for proxy(1), "later" is too late, because it exits after the first query. To resolve this, add a way for pxgsettings to signal that it has written all the initial values (a blank line), and wait for that. Fixes: #116 Signed-off-by: Simon McVittie <smcv@debian.org>
* | Merge pull request #105 from mwilck/pacrunnerDominique Leuenberger2020-04-291-0/+172
|\ \ | |/ |/| New attempt to merge pacrunner support
| * config_pacrunner: update response parsingMartin Wilck2020-02-141-3/+7
| | | | | | | | | | Use the same algorithm as pacrunner's own "shim" libproxy, and add support for socks4 and socks5.
| * config_pacrunner: add test for pacrunner availability on D-BusMartin Wilck2020-02-141-1/+47
| | | | | | | | | | If the "org.pacrunner" D-Bus name is owned, it's likely that pacrunner is running. Use this as test for the module.
| * Add config module for querying PacRunnerDavid Woodhouse2020-02-141-0/+122
| |
* | pxgsettings: use the correct syntax to connect to the changed signalCorentin Noël2020-04-261-1/+1
| | | | | | | | | | As it is a detailed signal, it only makes sense to append a :: when there is a specific property to target. It used to be accepted but triggers a runtime warning with latest GLib.
* | Merge pull request #101 from albert-astals-cid-kdab/small_perf_improvDominique Leuenberger2020-04-163-5/+5
|\ \ | | | | | | Small performance improvements
| * | Small performance improvementsAlbert Astals Cid2019-10-043-5/+5
| |/ | | | | | | | | * pass strings by const & instead of copy * Search single chars as chars and not as strings
* | Merge pull request #109 from iainlane/mozjs-68Dominique Leuenberger2020-04-161-20/+36
|\ \ | | | | | | mozjs: Port to mozjs 68
| * | mozjs: Port to mozjs 68Iain Lane2020-03-111-20/+36
| |/ | | | | | | | | | | | | | | | | | | | | There are a number of API changes that need to be adapted to, notably - JS_EncodeString is gone; need to use JS_EncodeStringToUTF8 now which requires a rooted object to be passed in. - JS_free is gone The pkg-config file ships some flags which need to be supplied to the build.
* | config_kde: Initialize config_loc.mtime explicitlyFabian Vogt2020-03-231-2/+4
|/ | | | Fixes #110
* Merge pull request #93 from alanc/masterDominique Leuenberger2019-07-161-0/+1
|\ | | | | include <string.h> in modules/config_gnome3.cpp
| * include <string.h> in modules/config_gnome3.cppAlan Coopersmith2018-10-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | Needed to fix build on Solaris 11: libproxy/modules/config_gnome3.cpp:190:3: error: ‘memset’ was not declared in this scope FD_ZERO(&rfds); ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* | Fixing memory leak in functions 'dnsResolve' and 'webkit_pacrunner::run'. ↵Dhaval Ved2019-02-141-2/+11
|/ | | | Delete memory allocated in jstr2str before return statements.
* Revert "Do not invoke extra shell to run pxgsettings"Dominique Leuenberger2018-10-031-1/+1
| | | | | | | | | | | | | | """ sigh OK I now see why it was using /bin/sh to start the helper. It's because the code is concatenate the gsettings keys to watch (in all_keys) as parameters So this is not enough to just remove /bin/bash """ This reverts commit 8012bed4405efa31fffb57d6282de3e1513e4bd9.
* Add call to JS::InitSelfHostedCode()Laurent Bigonville2018-10-021-0/+2
| | | | This is needed otherwise mozjs crashes
* Build with mozjs-52Pierre Lejeune2018-07-021-12/+7
| | | | Fixes #71
* Do not invoke extra shell to run pxgsettingsDominique Leuenberger2018-01-081-1/+1
| | | | Fixes issue #57
* Merge branch 'master' into masterJeremy Linton2017-04-263-1/+12
|\
| * Merge pull request #61 from bigon/bug-59Dominique Leuenberger2017-02-071-0/+1
| |\ | | | | | | Set lasturl to NULL after free/delete
| | * Set lasturl to NULL after free/deleteLaurent Bigonville2017-02-071-0/+1
| | | | | | | | | | | | | | | | | | | | | It avoids the lasturl to be freed a 2nd time when the rewind() method is called. Closes: #59
| * | Use StateChanged signal instead of StateChangeLaurent Bigonville2017-02-071-1/+1
| |/ | | | | | | | | | | | | | | StateChange signal has been deprecated since NM 0.7 and has been completely removed in 0.9, see: https://developer.gnome.org/NetworkManager/0.9/ref-migrating.html Closes: #58
| * pxgsettings: Avoid key listing deprecationDavid King2017-01-031-0/+7
| | | | | | | | | | g_settings_list_keys() is deprecated, and g_settings_schema_list_keys() should be used instead as of GLib 2.46.
| * pxgsettings: Fix memory leak of key namesDavid King2017-01-031-0/+1
| | | | | | | | | | The key names returned by g_settings_list_keys() are annotated as being transfer full, so must be freed after use.
| * pxgsettings: Avoid g_type_init deprecation warningDavid King2017-01-031-0/+2
| | | | | | | | g_type_init() was deprecated in GLib 2.36.
* | Update build to mozjs38Jeremy Linton2017-04-261-38/+53
| | | | | | | | | | | | | | | | This pull libproxy forward a little more to mozjs38, which is where gnome is currently at. This means most distro's will already be shipping this version of mozjs. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
* | Update build to mozjs24Jeremy Linton2016-09-171-23/+26
|/ | | | | | | This pulls libproxy forward a little, and brings it in line with gnome which is also on mozjs24. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
* GNOME3: Wait for pxgsettings to vanish while destroying the pluginDominique Leuenberger2016-07-221-0/+2
| | | | | | | | This helps avoiding zombie processes in case a caller creates/destroys ProxyFactories for each URL (even though we recommend to have a long-living PF for caching reasons). Originally reported at https://bugzilla.opensuse.org/show_bug.cgi?id=967601
* config_kde: Don't pollute stderrFabian Vogt2016-05-111-1/+3
| | | | - https://bugzilla.opensuse.org/show_bug.cgi?id=979232
* config_kde: Remove use of C++11Fabian Vogt2016-05-111-12/+14
| | | | | | - Use std::map::find instead of map::at (issue #29) - Add additional safety check - Return as const ref
* NetworkManager: gain compatibility to be built against libnm unstead ofDominique Leuenberger2016-05-021-0/+6
| | | | the legacy libnm-glib (we only use the dbus interface)
* NetworkManager: the location of NetworkManager.h is specified by pkg-configDominique Leuenberger2016-05-011-1/+1
| | | | | | | The directory structure of NetworkManager can change over time. pkg-config informs us of the correct location to find headers at. NM does not add subdirectories on its own. https://github.com/libproxy/libproxy/issues/26
* Fix #24 NULL pointer dereference in ignore_ip.cpp line 151Adam Wolk2016-04-181-1/+1
| | | | | | | | | | | | | | | | Qt5 started to use libproxy and this exposed a crashing bug on OpenBSD when using Qt5 applications on Gnome 3. Here's a sample backtrace: https://gist.github.com/mulander/c03997ae7e3fe4e30af0d4f2ce2965f0 The issue is caused by an unguarded dereference of ign_ip. Other parts of the code properly expect that sockaddr_from_string might return null and guard against it. Adding a proper guard prevents a segfault both in OpenBSD www/otter-browser and devel/zeal.
* Fix mismatched new[]/delete in pacrunner_natus and _webkitFabian Vogt2016-02-172-5/+5
|
* config_kde: Add a basic cache and invalidationFabian Vogt2016-02-171-10/+88
| | | | | | | After finding out whether to use kreadconfig5 or kreadconfig, it uses either qtpaths or kde4-config to determine the locations of the kioslaverc config file, to be able to notice modifications that require a cache flush.
* Add generic KDE config moduleFabian Vogt2016-01-122-108/+147
| | | | - Does not depend on Qt, uses kreadconfig/kreadconfig5
* pxgsettings: g_signal_connect does not emmit changed signalsDominique Leuenberger2015-05-031-2/+1
| | | | | | | In recent versions of GLIB, it is mandatory to FIRST connect to the changed:: signal and then read values. Without reading the values, it seems there is an initialization missing to start the change monitoring. So: we now first connect the signal handler, directly followed by reading all the settings we care about.