KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
artiqwest
★ 24
Open GitHub ↗
basic http request over tor using arti.
Download README (.md)
Explore Similar Repositories
CMP
:
No description available.
ankigen
:
Gradio application using LLMs to generate csv/apkg to aid with memorizing topics in Anki
redbook-keywords
:
本程序使用`selenium`自动化测试框架结合`ChromeDriver`浏览器驱动,模拟用户登录小红书网站,根据关键词搜索帖子,并收集帖子中的文章链接,保存到本地文件中。 主要用于自动化数据抓取、解析和管理,通过模块化的日志系统跟踪项目的执行流程。 此项目采用了多个流行的Python库,使得项目在数据抓取和自动化任务中表现出色,适用于爬虫、数据处理和自动化任务场景。
repo759
:
About repo with information useful for the Fall 2024 offering of ECE 759 - High Performance Computing for Applications in Engineering
ShareDir
:
Share your files and folders with ease
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
artiqwest
?
Download (.md)
 <br><br> <a src="https://docs.rs/artiqwest/latest/artiqwest/"></a> <a src="https://crates.io/crates/artiqwest"></a>  <br><br> Artiqwest is a simple HTTP client that routes *all *(except localhost connects where it fallbacks to [reqwest](https://github.com/seanmonstar/reqwest))* requests through the Tor network using the `arti_client` and `hyper`. It provides two basic primitives: `get` and `post`, functions. Artiqwest also provides a `ws` function to create a websocket connection to a hidden service using [tokio-tungstenite](https://github.com/snapview/tokio-tungstenite). ~~*Currently websockets only work over tor and are untested over clearnet.*~~ * ***NEW! Websockets no work over both Tor and clearnet! Fully tested!!!*** * ***NEW! You can now optionally pass in an existing arti `TorClient`. If you don't have one don't worry, Atriqwest will handle the Tor stuff for you automatically.*** * ***NEW! If you `TorClient` expires or loses connection we will auto-reload your `Torclient` up to five times before failing.*** ## Example ```rust use artiqwest::get; use artiqwest::post; use artiqwest::ws; use futures_util::future; use futures_util::pin_mut; use futures_util::SinkExt; use tokio_tungstenite::tungstenite::Message; #[tokio::main] async fn main() { // Make a GET request to httpbin.org let response = get("https://httpbin.org/get", None, None).await.unwrap(); assert_eq!(response.status(), 200); // Make a POST request to a hidden service let body = r#"{"test": "testing"}"#; let headers = vec![("Content-Type", "application/json")]; let response = post("http://vpns6exmqmg5znqmgxa5c6rgzpt6imy5yzrbsoszovgfipdjypnchpyd.onion/echo", body, Some(headers), None).await.unwrap(); assert_eq!(response.to_string(), body); // Create a websocket connection to a hidden service. let (mut write, read) = ws("wss://ydrkehoqxt2q5atkmiyw7gmphvrmp6fkaufvt525cjr4hma3pb75nyid.onion/events", None).await.unwrap(); let write_messages = { async { loop { write.send(Message::Text("Hello WebSocket".to_string())).await.unwrap(); tokio::time::sleep(tokio::time::Duration::from_secs(1)).await; } } }; let read_messages = { read.for_each(|message| async { let data = message.unwrap().into_data(); let text = String::from_utf8(data).unwrap(); println!("Received: {text}"); }) }; pin_mut!(read_messages, write_messages); future::select(read_messages, write_messages).await; } ```