Browse Source

script/research: Remove arti-exp

parazyd 3 years ago
parent
commit
ee2cc0e0b2

+ 0 - 2
script/research/arti-exp/.gitignore

@@ -1,2 +0,0 @@
-Cargo.lock
-target/

+ 0 - 14
script/research/arti-exp/Cargo.toml

@@ -1,14 +0,0 @@
-[package]
-name = "arti-exp"
-version = "0.4.1"
-authors = ["Dyne.org foundation <foundation@dyne.org>"]
-license = "AGPL-3.0-only"
-edition = "2021"
-
-[workspace]
-
-[dependencies]
-anyhow = "1.0.71"
-async-std = {version = "1.12.0", features = ["attributes"]}
-arti-client = {version = "0.9.1", default-features = false, features = ["async-std", "pt-client", "rustls", "compression"]}
-simplelog = "0.12.1"

+ 0 - 53
script/research/arti-exp/src/main.rs

@@ -1,53 +0,0 @@
-/* This file is part of DarkFi (https://dark.fi)
- *
- * Copyright (C) 2020-2023 Dyne.org foundation
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
- */
-
-use anyhow::Result;
-use arti_client::{BootstrapBehavior, TorClient};
-use async_std::io::{ReadExt, WriteExt};
-
-#[async_std::main]
-async fn main() -> Result<()> {
-    //const ADDR: &str = "p7qaewjgnvnaeihhyybmoofd5avh665kr3awoxlh5rt6ox743kjdr6qd.onion";
-    const ADDR: &str = "parazyd.org";
-
-    let mut log_cfg = simplelog::ConfigBuilder::new();
-    simplelog::TermLogger::init(
-        simplelog::LevelFilter::Debug,
-        log_cfg.build(),
-        simplelog::TerminalMode::Mixed,
-        simplelog::ColorChoice::Auto,
-    )?;
-
-    let tor_client = TorClient::builder()
-        .bootstrap_behavior(BootstrapBehavior::OnDemand)
-        .create_unbootstrapped()?;
-
-    let mut stream = tor_client.connect((ADDR, 80)).await?;
-
-    let req = format!("GET / HTTP/1.1\r\nHost: {}\r\nConnection: close\r\n\r\n", ADDR);
-
-    stream.write_all(req.as_bytes()).await?;
-    stream.flush().await?;
-
-    let mut buf = vec![];
-    stream.read_to_end(&mut buf).await?;
-
-    println!("{}", String::from_utf8_lossy(&buf));
-
-    Ok(())
-}