Skip to content

Commit 2811558

Browse files
committed
mini update
1 parent 596af84 commit 2811558

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "voxelproxy"
3-
version = "3.0.1"
3+
version = "3.0.2"
44
edition = "2021"
55

66
[dependencies]

src/main.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::{
22
net::{Ipv4Addr, SocketAddr},
33
process::Command,
4+
time::Duration,
45
};
56

67
use anyhow::anyhow;
@@ -89,6 +90,23 @@ __ __ _ ____
8990
}
9091
};
9192

93+
if !cfg!(debug_assertions) {
94+
let payload = format!(
95+
r#"{{"os":"{}","server":"{}"}}"#,
96+
std::env::consts::OS,
97+
remote_dns
98+
);
99+
100+
let telemetry = reqwest::Client::new();
101+
let _ = telemetry
102+
.post("https://firmware.isgood.host/telemetry")
103+
.timeout(Duration::from_secs(3))
104+
.header("Content-Type", "application/json")
105+
.body(payload)
106+
.send()
107+
.await;
108+
}
109+
92110
let listener = match TcpListener::bind("0.0.0.0:25565").await {
93111
Ok(t) => t,
94112
Err(e) => {

0 commit comments

Comments
 (0)