Skip to content

Commit b3640f1

Browse files
committed
release: 0.21.0
2 parents b05f9c9 + 66a15be commit b3640f1

11 files changed

Lines changed: 110 additions & 87 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ cargo install \
2727

2828
# Optional: download/save the advanced settings template so you can make
2929
# changes if/as needed.
30-
wget -qO- https://raw.githubusercontent.com/Blobfolio/adbyss/refs/heads/master/adbyss/skel/adbyss.yaml | \
31-
sudo tee /etc/adbyss.yaml >/dev/null
30+
wget -qO- https://raw.githubusercontent.com/Blobfolio/adbyss/refs/heads/master/adbyss/skel/adbyss.toml | \
31+
sudo tee /etc/adbyss.toml >/dev/null
3232
```
3333

3434

@@ -37,7 +37,7 @@ wget -qO- https://raw.githubusercontent.com/Blobfolio/adbyss/refs/heads/master/a
3737

3838
It's easy.
3939

40-
Advanced settings are stored in `/etc/adbyss.yaml`. Just grab, edit, and save the [default config](https://raw.githubusercontent.com/Blobfolio/adbyss/refs/heads/master/adbyss/skel/adbyss.yaml) to that location if you want to change anything.
40+
Advanced settings are stored in `/etc/adbyss.toml`. Just grab, edit, and save the [default config](https://raw.githubusercontent.com/Blobfolio/adbyss/refs/heads/master/adbyss/skel/adbyss.toml) to that location if you want to change anything.
4141

4242
Otherwise, just run `sudo adbyss [FLAGS] [OPTIONS]`.
4343

@@ -57,9 +57,9 @@ And the following option is available:
5757

5858
| Short | Long | Value | Description |
5959
| ----- | ---- | ----- | ----------- |
60-
| `-c` | `--config` | `<PATH>` | Use this configuration instead of /etc/adbyss.yaml. |
60+
| `-c` | `--config` | `<PATH>` | Use this configuration instead of /etc/adbyss.toml. |
6161

62-
After running Adbyss for the first time, you might find some web sites are no longer working as expected. Most likely you're blocking an evil dependency the web site thinks it *needs*. No worries, just open your browser's Network Dev Tool window and reload the page. Make note of any failing domain(s), and update the `/etc/adbyss.yaml` configuration accordingly.
62+
After running Adbyss for the first time, you might find some web sites are no longer working as expected. Most likely you're blocking an evil dependency the web site thinks it *needs*. No worries, just open your browser's Network Dev Tool window and reload the page. Make note of any failing domain(s), and update the `/etc/adbyss.toml` configuration accordingly.
6363

6464
Restart your browser and/or computer and everything should be peachy again.
6565

@@ -71,7 +71,7 @@ It is important to remember that scammers and capitalists birth new schemes all
7171

7272
## Automation
7373

74-
The repository contains two `systemd` scripts — a [timer](https://github.com/Blobfolio/adbyss/tree/master/adbyss/skel/systemd/adbyss.timer) and a [service](https://github.com/Blobfolio/adbyss/tree/master/adbyss/skel/systemd/adbyss.service) — that can be used to automatically update your `/etc/hosts` file once daily using the global settings (stored in `/etc/adbyss.yaml`).
74+
The repository contains two `systemd` scripts — a [timer](https://github.com/Blobfolio/adbyss/tree/master/adbyss/skel/systemd/adbyss.timer) and a [service](https://github.com/Blobfolio/adbyss/tree/master/adbyss/skel/systemd/adbyss.service) — that can be used to automatically update your `/etc/hosts` file once daily using the global settings (stored in `/etc/adbyss.toml`).
7575

7676
If you installed Adbyss using the pre-built `.deb` package, all you need to do is enable and start the timer, then you can forget all about it!
7777

adbyss/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "adbyss"
3-
version = "0.20.0"
3+
version = "0.21.0"
44
license = "WTFPL"
55
authors = ["Josh Stoik <josh@blobfolio.com>"]
66
edition = "2024"
@@ -18,11 +18,11 @@ extended-description = ""
1818
section = "net"
1919
assets = [
2020
["../target/release/adbyss", "usr/bin/", "755"],
21-
["./skel/adbyss.yaml", "etc/", "644"],
21+
["./skel/adbyss.toml", "etc/", "644"],
2222
["../release/completions/adbyss.bash", "etc/bash_completion.d/", "644"],
2323
["../release/man/adbyss.1.gz", "usr/share/man/man1/", "644"],
2424
]
25-
conf-files = [ "/etc/adbyss.yaml" ]
25+
conf-files = [ "/etc/adbyss.toml" ]
2626
maintainer-scripts = "./skel/systemd/"
2727

2828
[package.metadata.deb.systemd-units]
@@ -71,13 +71,13 @@ description = 'Non-interactive mode; answer "yes" to all prompts.'
7171
short = "-c"
7272
long = "--config"
7373
label = "<FILE>"
74-
description = "Use this configuration instead of /etc/adbyss.yaml."
74+
description = "Use this configuration instead of /etc/adbyss.toml."
7575
path = true
7676

7777
[[package.metadata.bashman.sections]]
7878
name = "GLOBAL"
7979
inside = true
80-
lines = [ "Additional settings are stored in /etc/adbyss.yaml. Edit those to set your preferred global runtime behaviors." ]
80+
lines = [ "Additional settings are stored in /etc/adbyss.toml. Edit those to set your preferred global runtime behaviors." ]
8181

8282
[[package.metadata.bashman.sections]]
8383
name = "SOURCE LISTS"
@@ -91,11 +91,11 @@ items = [
9191
[dependencies]
9292
argyle = "0.13.*"
9393
dactyl = "0.13.*"
94-
fyi_msg = "2.3.*"
94+
fyi_msg = "2.4.*"
9595
regex = "1.11.*"
96-
serde_yml = "=0.0.12"
96+
toml = "=0.9.*"
9797
trimothy = "0.9.*"
98-
utc2k = "0.16.*"
98+
utc2k = "0.17.*"
9999
write_atomic = "0.7.*"
100100

101101
[dependencies.adbyss_psl]
@@ -105,7 +105,7 @@ features = [ "serde" ]
105105
[dependencies.minreq]
106106
version = "2.14.*"
107107
default-features = false
108-
features = ["https"]
108+
features = [ "https" ]
109109

110110
[dependencies.nix]
111111
version = "0.30.*"
Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# See https://en.wikipedia.org/wiki/Hosts_(file) for general information.
2121
##
2222

23-
hostfile: "/etc/hosts"
23+
hostfile = "/etc/hosts"
2424

2525

2626
##
@@ -30,7 +30,7 @@ hostfile: "/etc/hosts"
3030
# updating it with any shitlist changes.
3131
##
3232

33-
backup: true
33+
backup = true
3434

3535

3636
##
@@ -47,7 +47,7 @@ backup: true
4747
# false.
4848
##
4949

50-
compact: true
50+
compact = true
5151

5252

5353
##
@@ -57,10 +57,10 @@ compact: true
5757
# value to false.
5858
##
5959

60-
source_adaway: true
61-
source_adbyss: true
62-
source_stevenblack: true
63-
source_yoyo: true
60+
source_adaway = true
61+
source_adbyss = true
62+
source_stevenblack = true
63+
source_yoyo = true
6464

6565

6666
##
@@ -71,11 +71,12 @@ source_yoyo: true
7171
#
7272
# Add any such hosts below to have them excluded from the blocklists, like:
7373
#
74-
# exclude:
75-
# - example1.com
76-
# - example2.com
74+
# exclude = [
75+
# "example1.com",
76+
# "example2.com",
77+
# ]
7778
##
78-
exclude: []
79+
exclude = []
7980

8081

8182
##
@@ -95,25 +96,25 @@ exclude: []
9596
#
9697
# In practice this would look something like:
9798
#
98-
# regexclude:
99-
# - '(.+\.)*example.com$'
99+
# regexclude = [ '(.+\.)*example.com$' ]
100100
##
101101

102-
regexclude: []
102+
regexclude = []
103103

104104

105105
##
106106
# Custom Blocks
107107
#
108108
# If you have additional enemeies, add the host(s) below, like:
109109
#
110-
# include:
111-
# - example1.com
112-
# - example2.com
110+
# include = [
111+
# "example1.com",
112+
# "example2.com",
113+
# ]
113114
#
114115
# You can also save any number of custom entries directly to your hostfile.
115116
# Adbyss will preserve anything prior to the ADBYSS block when writing
116117
# blocklist updates (unless the --no-preserve flag is set).
117118
##
118119

119-
include: []
120+
include = []

adbyss/skel/test.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
##
2+
# This configuration is used for unit tests.
3+
##
4+
5+
hostfile = "/etc/hosts"
6+
backup = false
7+
compact = false
8+
9+
source_adaway = false
10+
source_adbyss = true
11+
source_stevenblack = false
12+
source_yoyo = false
13+
14+
exclude = [
15+
"collect.snitcher.com"
16+
]
17+
18+
regexclude = [
19+
'(.+\.)*triptease.io$'
20+
]
21+
22+
include = [
23+
"batman.com",
24+
"spiderman.com",
25+
]

adbyss/skel/test.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

adbyss/src/err.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ FLAGS:
4141
-y, --yes Non-interactive mode; answer "yes" to all prompts.
4242
4343
OPTIONS:
44-
-c, --config <path> Use this configuration instead of /etc/adbyss.yaml.
44+
-c, --config <path> Use this configuration instead of /etc/adbyss.toml.
4545
4646
SOURCES:
4747
AdAway: <https://adaway.org/>
4848
Steven Black: <https://github.com/StevenBlack/hosts>
4949
Yoyo: <https://pgl.yoyo.org/adservers/>
5050
51-
Additional global settings are stored in /etc/adbyss.yaml.
51+
Additional global settings are stored in /etc/adbyss.toml.
5252
"#);
5353

5454

adbyss/src/settings.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use std::{
2727

2828

2929

30-
#[expect(clippy::struct_excessive_bools, reason = "The fields mirror our YAML config.")]
30+
#[expect(clippy::struct_excessive_bools, reason = "The fields mirror our TOML config.")]
3131
#[derive(Debug, Clone, Deserialize)]
3232
#[serde(default)]
3333
/// # Settings.
@@ -89,14 +89,14 @@ impl Settings {
8989
pub(super) const DEFAULT_HOSTFILE: &str = "/etc/hosts";
9090

9191
/// # Default Config Location.
92-
pub(super) const DEFAULT_CONFIG: &str = "/etc/adbyss.yaml";
92+
pub(super) const DEFAULT_CONFIG: &str = "/etc/adbyss.toml";
9393

9494
/// # From File.
9595
pub(super) fn from_file<P: AsRef<Path>>(src: P) -> Result<Self, AdbyssError> {
9696
let src = src.as_ref();
9797
let raw = std::fs::read_to_string(src)
9898
.map_err(|_| AdbyssError::Read(src.to_string_lossy().into_owned()))?;
99-
serde_yml::from_str::<Self>(&raw)
99+
toml::from_str::<Self>(&raw)
100100
.map_err(|e| AdbyssError::Parse(e.to_string()))
101101
}
102102
}
@@ -152,7 +152,7 @@ impl Settings {
152152
let (out, len) = self.build()?;
153153

154154
// Double-check with the user before continuing.
155-
if ! yes && ! fyi_msg::confirm!(yes: format!(
155+
if ! yes && ! fyi_msg::confirm!(@yes format!(
156156
"Write {} hosts to {}?",
157157
NiceU64::from(len),
158158
self.hostfile.display(),
@@ -179,7 +179,7 @@ impl Settings {
179179
// We only need to take action if there were entries to begin with.
180180
if changed {
181181
// Prompt the user before taking any action.
182-
if ! yes && ! fyi_msg::confirm!(yes: format!(
182+
if ! yes && ! fyi_msg::confirm!(@yes format!(
183183
"Remove all Adbyss blackhole entries from {}?",
184184
self.hostfile.display(),
185185
)) {
@@ -410,7 +410,7 @@ mod tests {
410410

411411
#[test]
412412
fn t_filters() {
413-
let settings = Settings::from_file("skel/test.yaml")
413+
let settings = Settings::from_file("skel/test.toml")
414414
.expect("Unable to parse settings.");
415415

416416
// The only enabled source should be our own (local) one.

adbyss_psl/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33

44

5+
## [0.21.0](https://github.com/Blobfolio/adbyss/releases/tag/v0.21.0) - 2025-09-18
6+
7+
### Changed
8+
9+
* Replace `serde` with `serde_core` (optional dependency)
10+
11+
12+
513
## [0.20.0](https://github.com/Blobfolio/adbyss/releases/tag/v0.20.0) - 2025-08-12
614

715
### New

adbyss_psl/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "adbyss_psl"
3-
version = "0.20.0"
3+
version = "0.21.0"
44
license = "WTFPL"
55
authors = ["Josh Stoik <josh@blobfolio.com>"]
66
edition = "2024"
@@ -23,14 +23,14 @@ serde_json = "1.0.100"
2323

2424
[dev-dependencies]
2525
brunch = "0.11.*"
26-
serde = "1.0.*"
26+
serde_core = "1.0.*"
2727
serde_json = "1.0.*"
2828

2929
[dependencies]
3030
idna = "1.0.0"
3131
trimothy = "0.9.*"
3232

33-
[dependencies.serde]
33+
[dependencies.serde_core]
3434
version = "1.0.*"
3535
default-features = false
3636
optional = true
@@ -44,7 +44,7 @@ default-features = false
4444
default = []
4545

4646
# Expose (de)/serialize support for adbyss_psl::Domain.
47-
serde = [ "dep:serde" ]
47+
serde = [ "dep:serde_core" ]
4848

4949
# Add sqlx type/decode/encode support for adbyss_psl::Domain.
5050
sqlx-mysql = [ "sqlx", "sqlx/mysql" ]

adbyss_psl/src/serde.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Adbyss: Serde Extensions.
33
*/
44

5-
use serde::{
5+
use serde_core::{
66
de,
77
Deserialize,
88
Serialize,

0 commit comments

Comments
 (0)