Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
arti
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
S0AndS0
arti
Commits
e0ddb522
Commit
e0ddb522
authored
3 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Update READMEs.
parent
db649702
No related branches found
Branches containing commit
Tags
tor-0.1.0.5-rc
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tor-client/README.md
+6
-2
6 additions, 2 deletions
tor-client/README.md
tor-rtcompat/README.md
+4
-5
4 additions, 5 deletions
tor-rtcompat/README.md
tor-rtmock/README.md
+5
-4
5 additions, 4 deletions
tor-rtmock/README.md
with
15 additions
and
11 deletions
tor-client/README.md
+
6
−
2
View file @
e0ddb522
# tor-client
#
arti-
tor-client
High-level functionality for accessing the Tor network as a client.
(Note that this crate is called
`tor-client`
in some other places,
since we didn't know about the conflict with
`tor_client`
. We will
clean all of this up somehow before the next release.)
## Overview
The
`tor-client`
crate aims to provide a safe, easy-to-use API for
The
`
arti-
tor-client`
crate aims to provide a safe, easy-to-use API for
applications that want to use Tor network to anonymize their
traffic. It hides most of the underlying detail, letting other
crates decide how exactly to use the Tor crate.
...
...
This diff is collapsed.
Click to expand it.
tor-rtcompat/README.md
+
4
−
5
View file @
e0ddb522
...
...
@@ -18,8 +18,7 @@ yet exists, including:
Additionally, the
`AsyncRead`
and
`AsyncWrite`
traits provide by
[
`futures`
] are not the same as those provided by
`tokio`
, and
require compatibility wrappers to use. (We re-export those of
[
`tokio_util`
].
require compatibility wrappers to use.
To solve these problems, the
`tor-rtcompat`
crate provides a set
of traits that represent a runtime's ability to perform these
...
...
@@ -64,10 +63,10 @@ You can get a [`Runtime`] in several ways:
using for anything besides Arti, you can use [
`create_runtime()`
].
*
If you want to explicitly construct a runtime with a specific
backend, you can do so with
`
create_async_std_runtime`
or
[
`create_tokio_runtime`
]. Or if you have already constructed a
backend, you can do so with
[
`async_std::
create_async_std_runtime`
]
or
[
`
tokio::
create_tokio_runtime`
]. Or if you have already constructed a
tokio runtime that you want to use, you can wrap it as a
[
`Runtime`
] explicitly with [
`TokioRuntimeHandle`
].
[
`Runtime`
] explicitly with [
`
tokio::
TokioRuntimeHandle`
].
## Cargo features
...
...
This diff is collapsed.
Click to expand it.
tor-rtmock/README.md
+
5
−
4
View file @
e0ddb522
...
...
@@ -64,11 +64,12 @@ use tor_rtmock::{MockSleepRuntime,MockNetRuntime,net::MockNetwork};
use
tor_rtcompat
::{
TcpProvider
,
TcpListener
};
use
futures
::
io
::
AsyncReadExt
;
let
addr1
=
"198.51.100.7"
.parse
()
.unwrap
();
let
addr2
=
"198.51.100.99"
.parse
()
.unwrap
();
let
sockaddr
=
"198.51.100.99:101"
.parse
()
.unwrap
();
tor_rtcompat
::
test_with_all_runtimes!
(|
rt
|
async
move
{
let
addr1
=
"198.51.100.7"
.parse
()
.unwrap
();
let
addr2
=
"198.51.100.99"
.parse
()
.unwrap
();
let
sockaddr
=
"198.51.100.99:101"
.parse
()
.unwrap
();
tor_rtcompat
::
test_with_runtime
(|
rt
|
async
{
// Make a runtime that pretends that we are at the first address...
let
fake_internet
=
MockNetwork
::
new
();
let
rt1
=
fake_internet
.builder
()
.add_address
(
addr1
)
.runtime
(
rt
.clone
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment