Skip to main content

Module proxy

Module proxy 

Source
Expand description

A simple reverse-proxy implementation for onion services.

Re-exportsยง

use futures::io::BufReader; ๐Ÿ”’
use futures::AsyncRead; ๐Ÿ”’
use futures::AsyncWrite; ๐Ÿ”’
use futures::Future; ๐Ÿ”’
use futures::FutureExt as _; ๐Ÿ”’
use futures::Stream; ๐Ÿ”’
use futures::StreamExt as _; ๐Ÿ”’
use futures::select_biased; ๐Ÿ”’
use itertools::iproduct; ๐Ÿ”’
use oneshot_fused_workaround as oneshot; ๐Ÿ”’
use safelog::sensitive as sv; ๐Ÿ”’
use std::collections::HashMap; ๐Ÿ”’
use std::io::Error as IoError; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::sync::Mutex; ๐Ÿ”’
use strum::IntoEnumIterator; ๐Ÿ”’
use tor_cell::relaycell::msg as relaymsg; ๐Ÿ”’
use tor_error::ErrorKind; ๐Ÿ”’
use tor_error::HasKind; ๐Ÿ”’
use tor_error::debug_report; ๐Ÿ”’
use tor_hsservice::HsNickname; ๐Ÿ”’
use tor_hsservice::RendRequest; ๐Ÿ”’
use tor_hsservice::StreamRequest; ๐Ÿ”’
use tor_log_ratelim::log_ratelim; ๐Ÿ”’
use tor_proto::client::stream::DataStream; ๐Ÿ”’
use tor_proto::stream::IncomingStreamRequest; ๐Ÿ”’
use tor_rtcompat::Runtime; ๐Ÿ”’
use tor_rtcompat::SpawnExt as _; ๐Ÿ”’
use crate::config::Encapsulation; ๐Ÿ”’
use crate::config::ProxyAction; ๐Ÿ”’
use crate::config::ProxyActionDiscriminants; ๐Ÿ”’
use crate::config::ProxyConfig; ๐Ÿ”’
use crate::config::TargetAddr; ๐Ÿ”’

Structsยง

OnionServiceReverseProxy
A reverse proxy that handles connections from an OnionService by routing them to local addresses.
State ๐Ÿ”’
Mutable part of an RProxy

Enumsยง

HandleRequestsError
An error that prevents further progress while processing requests.
RequestFailed ๐Ÿ”’
An error from a single attempt to handle an onion service request.

Constantsยง

STREAM_BUF_LEN ๐Ÿ”’
Size of buffer to use for communication between Arti and the target service.

Functionsยง

forward_connection ๐Ÿ”’
Try to open a connection to an appropriate local target using target_stream_future. If successful, try to report success on request and transmit data between the two stream indefinitely. On failure, close request.
run_action ๐Ÿ”’
Take the configured action from action on the incoming request request.