Release 1.1.11: IP Fetch Hotifx
All checks were successful
Run Tests on Code / run-tests (push) Successful in 35s
Build and release binary file and packages / test (push) Successful in 25s
Build and release binary file and packages / build (push) Successful in 41s
Build and release binary file and packages / upload-generic-package (push) Successful in 3s
Build and release binary file and packages / upload-debian-package (push) Successful in 10s
Build and release binary file and packages / create-release (push) Successful in 15s
All checks were successful
Run Tests on Code / run-tests (push) Successful in 35s
Build and release binary file and packages / test (push) Successful in 25s
Build and release binary file and packages / build (push) Successful in 41s
Build and release binary file and packages / upload-generic-package (push) Successful in 3s
Build and release binary file and packages / upload-debian-package (push) Successful in 10s
Build and release binary file and packages / create-release (push) Successful in 15s
This commit is contained in:
parent
9dda200e10
commit
9b8377cba9
3 changed files with 6 additions and 6 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -114,7 +114,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cloudflare-dns-updater"
|
name = "cloudflare-dns-updater"
|
||||||
version = "1.1.10"
|
version = "1.1.11"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"confy",
|
"confy",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
authors = ["Neshura"]
|
authors = ["Neshura"]
|
||||||
name = "cloudflare-dns-updater"
|
name = "cloudflare-dns-updater"
|
||||||
version = "1.1.10"
|
version = "1.1.11"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Application for automatically updating Cloudflare DNS records"
|
description = "Application for automatically updating Cloudflare DNS records"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
|
|
|
@ -24,8 +24,8 @@ struct Addresses {
|
||||||
impl Addresses {
|
impl Addresses {
|
||||||
fn new() -> Result<Self, Box<dyn Error>> {
|
fn new() -> Result<Self, Box<dyn Error>> {
|
||||||
let mut ret = Self {
|
let mut ret = Self {
|
||||||
ipv4_uri: "http://ip4only.me/api/".to_owned(),
|
ipv4_uri: "https://ipinfo.io/ip".to_owned(),
|
||||||
ipv6_uri: "http://ip6only.me/api/".to_owned(),
|
ipv6_uri: "https://v6.ipinfo.io/ip".to_owned(),
|
||||||
ipv4: Ipv4Addr::new(0, 0, 0, 0),
|
ipv4: Ipv4Addr::new(0, 0, 0, 0),
|
||||||
ipv6: Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)
|
ipv6: Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
};
|
};
|
||||||
|
@ -122,7 +122,7 @@ impl Addresses {
|
||||||
Ok(res) => {
|
Ok(res) => {
|
||||||
match res.status() {
|
match res.status() {
|
||||||
StatusCode::OK => {
|
StatusCode::OK => {
|
||||||
let ip_string = res.text().expect("Returned data should always contain text").trim_end().split(',').collect::<Vec<&str>>()[1].to_owned();
|
let ip_string = res.text().expect("Returned data should always contain text");
|
||||||
Ok(Ipv4Addr::from_str(ip_string.as_str()).expect("Returned IP should always be parseable"))
|
Ok(Ipv4Addr::from_str(ip_string.as_str()).expect("Returned IP should always be parseable"))
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
|
@ -145,7 +145,7 @@ impl Addresses {
|
||||||
Ok(res) => {
|
Ok(res) => {
|
||||||
match res.status() {
|
match res.status() {
|
||||||
StatusCode::OK => {
|
StatusCode::OK => {
|
||||||
let ip_string: String = res.text().expect("Returned data should always contain text").trim_end().split(',').collect::<Vec<&str>>()[1].to_owned();
|
let ip_string: String = res.text().expect("Returned data should always contain text");
|
||||||
Ok(Ipv6Addr::from_str(ip_string.as_str()).expect("Returned IP should always be parseable"))
|
Ok(Ipv6Addr::from_str(ip_string.as_str()).expect("Returned IP should always be parseable"))
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
|
|
Loading…
Reference in a new issue