Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ jobs:
features="tokio pac-engine-wasmtime"
fi
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
dbus-run-session -- cargo test --features "$features" os_roundtrip -- --nocapture
dbus-run-session -- cargo test --features "$features" platform::imp::tests::os_ -- --nocapture
else
cargo test --features "$features" os_roundtrip -- --nocapture
cargo test --features "$features" platform::imp::tests::os_ -- --nocapture
fi
shell: bash

Expand Down Expand Up @@ -585,6 +585,31 @@ jobs:
working-directory: bench/electron
shell: bash

msrv:
name: Rust 1.94 MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust 1.94
run: |
rustup toolchain install 1.94.0 --profile minimal --no-self-update
rustup default 1.94.0
- uses: Swatinem/rust-cache@v2
with:
key: msrv-1.94
# `--all-features` includes pac-engine-wasm2c, whose build script runs
# the pinned wasm2c.
- name: Install wasm2c (WABT 1.0.41)
run: |
mkdir -p "$HOME/wabt"
curl -sSL "https://github.com/WebAssembly/wabt/releases/download/1.0.41/wabt-1.0.41-linux-x64.tar.gz" \
| tar xz --strip-components=1 -C "$HOME/wabt"
echo "$HOME/wabt/bin" >> "$GITHUB_PATH"
- name: Check root crate
run: cargo check --locked --all-features --all-targets
- name: Check Node addon
run: cargo check --manifest-path npm/native/Cargo.toml --locked --all-targets

lint:
name: rustfmt + clippy + docs
runs-on: macos-latest
Expand Down Expand Up @@ -649,4 +674,3 @@ jobs:
echo "::error::npm/ThirdPartyNotices.txt is out of date. Run: cargo about generate --manifest-path npm/native/Cargo.toml --config about.toml --locked --fail --output-file npm/ThirdPartyNotices.txt npm/about.hbs"
exit 1
fi

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Notable changes to this project will be documented in this file.

## 0.5.0

### Changed

- Replaced Linux `dconf` and `gsettings` subprocesses with runtime-loaded,
in-process GIO configuration reads and change notifications.
- Raised the minimum supported Rust version to 1.94.

## 0.4.0

### Fixed
Expand Down
16 changes: 13 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "os-proxy-resolver"
version = "0.1.0"
version = "0.5.0"
edition = "2021"
rust-version = "1.77"
rust-version = "1.94"
# All first-party code is MIT (see LICENSE.txt). The embedded PAC engine links
# the MIT-licensed quickjs-ng via the `rquickjs-sys` crate; the PAC helper
# functions are original, implemented from the public PAC specification.
Expand Down Expand Up @@ -118,7 +118,7 @@ windows-sys = { version = "0.60", features = [
rquickjs-sys = { version = "0.12.1", optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
libc = "0.2"
libloading = "0.8"

[dev-dependencies]
tokio = { version = "1", features = ["sync", "rt", "macros", "time"] }
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ resolution.
|---|---|---|---|
| **Windows** | `WinHttpGetIEProxyConfigForCurrentUser` | selected embedded backend + DHCP/DNS WPAD; WinHTTP fallback when backend-less | registry change notification |
| **macOS** | `SCDynamicStoreCopyProxies` | built-in [QuickJS] PAC engine + DNS WPAD | `SCDynamicStore` callback |
| **Linux** | GNOME `org.gnome.system.proxy` via `gsettings` | built-in [QuickJS] PAC engine + DNS WPAD | `dconf watch` / `gsettings monitor` |
| **Linux** | GNOME `org.gnome.system.proxy` via runtime-loaded GIO | built-in [QuickJS] PAC engine + DNS WPAD | in-process GSettings callback |
Comment thread
chrmarti marked this conversation as resolved.

Linux loads GLib/GIO at runtime rather than linking it into the library. On
headless systems without GIO or the GNOME proxy schema, OS configuration is
unavailable and resolution continues with the environment-variable layer.
Alpine users can install its `glib` runtime package to enable GSettings-backed
OS configuration.

### PAC backends

Expand Down Expand Up @@ -210,6 +216,8 @@ is returned and retried.

## Building

The minimum supported Rust version is 1.94.

```sh
git clone <repo>
cargo build # Windows: native WinHTTP PAC/WPAD
Expand Down
26 changes: 23 additions & 3 deletions ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ instead.
Overview of licenses used:
- MIT License (109 crates)
- Apache License 2.0 (27 crates)
- ISC License (19 crates)
- Unicode License v3 (19 crates)
- ISC License (18 crates)
- Community Data License Agreement Permissive 2.0 (2 crates)
- BSD 3-Clause "New" or "Revised" License (1 crate)
- zlib License (1 crate)
Expand Down Expand Up @@ -1534,6 +1534,26 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

ISC License

Used by:
- libloading 0.8.9

Copyright © 2015, Simonas Kazlauskas

Permission to use, copy, modify, and/or distribute this software for any purpose with or without
fee is hereby granted, provided that the above copyright notice and this permission notice appear
in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.

--------------------------------------------------------------------------------

ISC License

Used by:
- rustls-webpki 0.103.13

Expand Down Expand Up @@ -2933,7 +2953,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License

Used by:
- os-proxy-resolver 0.1.0
- os-proxy-resolver 0.5.0

MIT License

Expand Down Expand Up @@ -3414,7 +3434,7 @@ Used by:
- rquickjs-sys 0.12.1

The MIT License (MIT)

Copyright (c) 2017-2026 Fabrice Bellard
Copyright (c) 2017-2024 Charlie Gordon
Copyright (c) 2023-2026 Ben Noordhuis
Expand Down
5 changes: 2 additions & 3 deletions npm/ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------

Expand Down Expand Up @@ -2012,7 +2012,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License

Used by:
- os-proxy-resolver 0.1.0
- os-proxy-resolver 0.5.0

MIT License

Expand Down Expand Up @@ -2482,4 +2482,3 @@ SPDX-License-Identifier: Unicode-3.0

Portions of ICU4X may have been adapted from ICU4C and/or ICU4J.
ICU 1.8.1 to ICU 57.1 © 1995-2016 International Business Machines Corporation and others.

8 changes: 4 additions & 4 deletions npm/native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions npm/native/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "os-proxy-resolver-node"
version = "0.1.0"
version = "0.5.0"
edition = "2021"
rust-version = "1.77"
rust-version = "1.94"
publish = false

[lib]
Expand Down
2 changes: 1 addition & 1 deletion npm/platforms/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/os-proxy-resolver-darwin-arm64",
"version": "0.4.0",
"version": "0.5.0",
"description": "Native binding for @vscode/os-proxy-resolver on macOS arm64",
"main": "os_proxy_resolver.node",
"files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"],
Expand Down
2 changes: 1 addition & 1 deletion npm/platforms/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/os-proxy-resolver-darwin-x64",
"version": "0.4.0",
"version": "0.5.0",
"description": "Native binding for @vscode/os-proxy-resolver on macOS x64",
"main": "os_proxy_resolver.node",
"files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"],
Expand Down
2 changes: 1 addition & 1 deletion npm/platforms/linux-arm-gnueabihf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/os-proxy-resolver-linux-arm-gnueabihf",
"version": "0.4.0",
"version": "0.5.0",
"description": "Native binding for @vscode/os-proxy-resolver on Linux armhf",
"main": "os_proxy_resolver.node",
"files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"],
Expand Down
2 changes: 1 addition & 1 deletion npm/platforms/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/os-proxy-resolver-linux-arm64-gnu",
"version": "0.4.0",
"version": "0.5.0",
"description": "Native binding for @vscode/os-proxy-resolver on Linux arm64",
"main": "os_proxy_resolver.node",
"files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"],
Expand Down
2 changes: 1 addition & 1 deletion npm/platforms/linux-arm64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/os-proxy-resolver-linux-arm64-musl",
"version": "0.4.0",
"version": "0.5.0",
"description": "Native binding for @vscode/os-proxy-resolver on Linux arm64 (musl)",
"main": "os_proxy_resolver.node",
"files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"],
Expand Down
2 changes: 1 addition & 1 deletion npm/platforms/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/os-proxy-resolver-linux-x64-gnu",
"version": "0.4.0",
"version": "0.5.0",
"description": "Native binding for @vscode/os-proxy-resolver on Linux x64",
"main": "os_proxy_resolver.node",
"files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"],
Expand Down
2 changes: 1 addition & 1 deletion npm/platforms/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/os-proxy-resolver-linux-x64-musl",
"version": "0.4.0",
"version": "0.5.0",
"description": "Native binding for @vscode/os-proxy-resolver on Linux x64 (musl)",
"main": "os_proxy_resolver.node",
"files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"],
Expand Down
2 changes: 1 addition & 1 deletion npm/platforms/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/os-proxy-resolver-win32-arm64-msvc",
"version": "0.4.0",
"version": "0.5.0",
"description": "Native binding for @vscode/os-proxy-resolver on Windows arm64",
"main": "os_proxy_resolver.node",
"files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"],
Expand Down
2 changes: 1 addition & 1 deletion npm/platforms/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/os-proxy-resolver-win32-x64-msvc",
"version": "0.4.0",
"version": "0.5.0",
"description": "Native binding for @vscode/os-proxy-resolver on Windows x64",
"main": "os_proxy_resolver.node",
"files": ["os_proxy_resolver.node", "LICENSE.txt", "ThirdPartyNotices.txt"],
Expand Down
4 changes: 2 additions & 2 deletions pac-wasm-guest/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pac-wasm-guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# this directory for how to regenerate it.
[package]
name = "pac-wasm-guest"
version = "0.1.0"
version = "0.5.0"
edition = "2021"
rust-version = "1.77"
rust-version = "1.94"
license = "MIT"
publish = false
description = "QuickJS-NG (via Javy) as a wasm32-wasip1 module for os-proxy-resolver's sandboxed PAC backend"
Expand Down
Loading
Loading