diff options
author | Himbeer <himbeer@disroot.org> | 2024-08-08 17:37:42 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-08-08 17:37:42 +0200 |
commit | a5577b7854193b50003becd28f5f1bf88b8203f2 (patch) | |
tree | d056f2a0ae8e4276bad2770aceb9765b9b0bd227 | |
parent | 956de0e580728157e868d882f23e7e07bd61b5b4 (diff) |
Use hijacked DNS resolution instead of IP address
macOS doesn't allow connections to raw IP addresses, hopefully this fixes it.
-rw-r--r-- | src-tauri/Cargo.lock | 2 | ||||
-rw-r--r-- | src-tauri/Cargo.toml | 2 | ||||
-rw-r--r-- | src-tauri/src/main.rs | 6 | ||||
-rw-r--r-- | src-tauri/tauri.conf.json | 2 | ||||
-rw-r--r-- | src/index.html | 2 |
5 files changed, 9 insertions, 5 deletions
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 1adfabd..4ab05aa 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2615,7 +2615,7 @@ dependencies = [ [[package]] name = "rsdsl_manager" -version = "0.0.2" +version = "0.0.3" dependencies = [ "chrono", "hex", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 858dcaf..ef02dd7 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rsdsl_manager" -version = "0.0.2" +version = "0.0.3" description = "RSDSL Verwaltungswerkzeug" authors = ["Himbeer"] edition = "2021" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 61ec7a0..f90cded 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,7 +1,7 @@ // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] -use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV6}; +use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV6}; use std::sync::Mutex; use std::time::{Duration, SystemTime}; @@ -1279,6 +1279,10 @@ fn main() { .manage(Mutex::new(Session { client: Client::builder() .danger_accept_invalid_certs(true) + .resolve( + "rsdsl", + SocketAddr::new(IpAddr::V4(Ipv4Addr::new(10, 128, 10, 254)), 8443), + ) .build() .expect("error creating http client"), instance: None, diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index cea2d4b..307ab5e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -6,7 +6,7 @@ }, "package": { "productName": "rsdsl_manager", - "version": "0.0.2" + "version": "0.0.3" }, "tauri": { "allowlist": { diff --git a/src/index.html b/src/index.html index e99099e..28708a8 100644 --- a/src/index.html +++ b/src/index.html @@ -15,7 +15,7 @@ <form id="connect-form"> <label class="row" for="connect-url" form="connect-form">Instanz-URL:</label> <div class="row"> - <input id="connect-url" value="https://10.128.10.254:8443" /> + <input id="connect-url" value="https://rsdsl:8443" /> </div> <br /> |