Skip to content

Commit

Permalink
fix changed APIs in cargo update, add new fake user agents
Browse files Browse the repository at this point in the history
  • Loading branch information
hinto-janai committed May 9, 2024
1 parent bffcea3 commit d203c94
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ pub static VISUALS: Lazy<Visuals> = Lazy::new(|| {
warn_fg_color: Color32::from_rgb(255, 143, 0), // orange
error_fg_color: Color32::from_rgb(255, 0, 0), // red
window_rounding: Rounding::same(6.0),
window_shadow: Shadow::big_dark(),
popup_shadow: Shadow::small_dark(),
// window_shadow: Shadow::big_dark(),
// popup_shadow: Shadow::small_dark(),
..Visuals::dark()
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,7 @@ impl eframe::App for App {
// It incrementally becomes more opaque until [self.alpha] >= 250, when we just switch to pure black (no alpha).
// When black, we're safe to [init_text_styles()], and then incrementally go transparent, until we remove the layer.
if self.resizing {
egui::Area::new("resize_layer")
egui::Area::new("resize_layer".into())
.order(egui::Order::Foreground)
.anchor(egui::Align2::CENTER_CENTER, (0.0, 0.0))
.show(ctx, |ui| {
Expand Down Expand Up @@ -1693,7 +1693,7 @@ impl eframe::App for App {
}
});
} else if self.alpha != 0 {
egui::Area::new("resize_layer")
egui::Area::new("resize_layer".into())
.order(egui::Order::Foreground)
.anchor(egui::Align2::CENTER_CENTER, (0.0, 0.0))
.show(ctx, |ui| {
Expand Down
14 changes: 8 additions & 6 deletions src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ use anyhow::{anyhow, Error};
use arti_client::TorClient;
use arti_hyper::*;
use hyper::{
body::Body,
client::Client,
header::{HeaderValue, LOCATION},
Body, Client, Request,
Request,
};
use log::*;
use rand::distributions::Alphanumeric;
Expand Down Expand Up @@ -172,7 +174,6 @@ const VALID_P2POOL: [&str; 4] = [
// Some fake Curl/Wget user-agents because GitHub API requires one and a Tor browser
// user-agent might be fingerprintable without all the associated headers.
const FAKE_USER_AGENT: [&str; 25] = [
"Wget/1.16.3",
"Wget/1.17",
"Wget/1.17.1",
"Wget/1.18",
Expand All @@ -192,11 +193,12 @@ const FAKE_USER_AGENT: [&str; 25] = [
"Wget/1.21.2",
"Wget/1.21.3",
"Wget/1.21.4",
"curl/7.65.3",
"curl/7.66.0",
"curl/7.67.0",
"curl/7.68.0",
"Wget/1.24.5",
"curl/8.4.0",
"curl/8.5.0",
"curl/8.6.0",
"curl/8.7.0",
"curl/8.7.1",
];

const MSG_NONE: &str = "No update in progress";
Expand Down

0 comments on commit d203c94

Please sign in to comment.