ip:port and bad ssl troubles
This commit is contained in:
commit
952a6a40bd
52 changed files with 81039 additions and 0 deletions
4
src-tauri/.cargo/config.toml
Normal file
4
src-tauri/.cargo/config.toml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[build]
|
||||
target = "x86_64-pc-windows-msvc"
|
||||
|
||||
[target]
|
||||
5734
src-tauri/Cargo.lock
generated
Normal file
5734
src-tauri/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
29
src-tauri/Cargo.toml
Normal file
29
src-tauri/Cargo.toml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
[package]
|
||||
name = "tazik2"
|
||||
version = "0.0.2"
|
||||
description = "Tazik2"
|
||||
authors = ["4aiman"]
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[lib]
|
||||
name = "tazik2_lib"
|
||||
crate-type = ["lib", "cdylib", "staticlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.0.0-beta", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2.0.0-beta", features = ["native-tls"] }
|
||||
tauri-plugin-shell = "2.0.0-beta"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-http = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-process = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-websocket = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-dialog = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-clipboard-manager = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-os = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
native-tls = { version = "0.2", optional = true }
|
||||
3
src-tauri/build.rs
Normal file
3
src-tauri/build.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
tauri_build::build()
|
||||
}
|
||||
75
src-tauri/capabilities/default.json
Normal file
75
src-tauri/capabilities/default.json
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "default",
|
||||
"description": "Capability for the main window",
|
||||
"windows": [
|
||||
"main"
|
||||
],
|
||||
"permissions": [
|
||||
"path:default",
|
||||
"event:default",
|
||||
"window:default",
|
||||
"app:default",
|
||||
"image:default",
|
||||
"resources:default",
|
||||
"menu:default",
|
||||
"tray:default",
|
||||
"shell:allow-open",
|
||||
"fs:read-all",
|
||||
"fs:write-all",
|
||||
{
|
||||
"identifier": "fs:write-all",
|
||||
"allow": [
|
||||
{
|
||||
"path": "$APPDATA/*"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifier": "fs:read-all",
|
||||
"allow": [
|
||||
{
|
||||
"path": "$APPDATA/*"
|
||||
}
|
||||
]
|
||||
},
|
||||
"fs:scope-applocaldata",
|
||||
"fs:scope-applocaldata-index",
|
||||
"fs:scope-applocaldata-recursive",
|
||||
"fs:allow-applocaldata-meta",
|
||||
"fs:allow-applocaldata-meta-recursive",
|
||||
"fs:allow-applocaldata-read",
|
||||
"fs:allow-applocaldata-read-recursive",
|
||||
"fs:allow-applocaldata-write",
|
||||
"fs:allow-applocaldata-write-recursive",
|
||||
"http:default",
|
||||
{
|
||||
"identifier": "http:default",
|
||||
"allow": [
|
||||
{
|
||||
"url": "http://**"
|
||||
},
|
||||
{
|
||||
"url": "https://**"
|
||||
},
|
||||
{
|
||||
"url": "http://*:*"
|
||||
},
|
||||
{
|
||||
"url": "https://*:*"
|
||||
}
|
||||
]
|
||||
},
|
||||
"process:default",
|
||||
"websocket:default",
|
||||
"process:allow-exit",
|
||||
"dialog:default",
|
||||
"clipboard-manager:default",
|
||||
"clipboard-manager:allow-write-text",
|
||||
"clipboard-manager:default",
|
||||
"os:allow-version",
|
||||
"os:allow-platform",
|
||||
"os:allow-os-type",
|
||||
"os:allow-arch"
|
||||
]
|
||||
}
|
||||
29
src-tauri/src/lib.rs
Normal file
29
src-tauri/src/lib.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
|
||||
#[tauri::command]
|
||||
fn greet(name: &str) -> String {
|
||||
format!("Hello, {}! You've been greeted from Rust!", name)
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_clipboard_manager::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_websocket::init())
|
||||
.plugin(tauri_plugin_process::init())
|
||||
.plugin(tauri_plugin_http::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.invoke_handler(tauri::generate_handler![send_request])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
||||
//===========================
|
||||
|
||||
#[tauri::command]
|
||||
fn send_request(url: &str) -> String {
|
||||
format!("You've tried to access this URL: {}.", url)
|
||||
}
|
||||
6
src-tauri/src/main.rs
Normal file
6
src-tauri/src/main.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
tazik2_lib::run()
|
||||
}
|
||||
32
src-tauri/tauri.conf.json
Normal file
32
src-tauri/tauri.conf.json
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"productName": "tazik2",
|
||||
"version": "0.0.1",
|
||||
"identifier": "org.chaiman.tazik",
|
||||
"build": {
|
||||
"frontendDist": "../src"
|
||||
},
|
||||
"app": {
|
||||
"withGlobalTauri": true,
|
||||
"windows": [
|
||||
{
|
||||
"title": "tazik2",
|
||||
"width": 1280,
|
||||
"height": 720
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": ""
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue