How to run tor arti with g3 http proxy
Table of Contents
Introduction๐
Short description how to use tor with an http proxy.
The solution uses 3 parts.
This picture shows how the setup looks like.
--- config: look: handDrawn theme: neutral --- flowchart LR A[Client] -->|HTTP-protocol| B[g3] -->|SOCKS-protocol| C[arti] --> D[TOR-Network] --> G[Original Destination] E[Client] -->|HTTP-protocol| B[g3] F[Client] -->|HTTP-protocol| B[g3] D[TOR-Network] --> H[Original Destination] D[TOR-Network] --> I[Original Destination] J[Client] -->|SOCKS-protocol| C[arti] K[Client] -->|SOCKS-protocol| C[arti]
arti๐
Cite from arti Homepage
Arti is a complete rewrite of the C Tor codebase, and it is currently under active development. It is written in Rust, and it is designed to be modular, reusable, and easy to audit.
You will need to build arti to run arti ๐. I run the setup on an ubuntu based distribution because of that will I use here the apt
command.
This is a small and short summery from the original compiling-arti Page.
# clone the repo
git clone https://gitlab.torproject.org/tpo/core/arti.git
# navigate to the directory
cd arti
## install some necessary packages
sudo apt install libsqlite3-dev
cargo build -p arti --release
Maybe you will need to run the build and install process several times to add all required dependencies to the host where you build arti
g3proxy๐
You can download prebuild packages for g3proxy or build your own. I have choose to build it.
git clone https://github.com/bytedance/g3
cd g3
sudo apt install liblua5.4-dev capnproto libc-ares-dev
cargo build
Maybe you will need to run the build and install process several times to add all required dependencies to the host where you build g3
g3proxy have a lot more configuration options then shown here which can be seen in there README
config๐
g3 requires an configuration file.
---
runtime:
thread_number: 2
log: stdout
server:
- name: http_proxy
escaper: default
type: http_proxy
listen:
address: "[::]:10087" # <<<< http-proxy listening port
tls_client: { } # Open layer-7 https forward forwarding support
escaper:
- name: default
type: proxy_socks5
proxy_addr: "[::1]:9150" # <<<< arti listening port
Runtime.๐
After both tools (arti, g3proxy) are now build start 2 shells and run in one arti and in the other g3.
shell 1 arti
/datadisk/git-repos/arti $
# target/release/arti proxy
2025-09-01T15:11:17Z INFO arti::subcommands::proxy: Starting Arti 1.5.0 in SOCKS proxy mode on localhost port 9150 ...
2025-09-01T15:11:17Z INFO tor_memquota::mtracker: Memory quota tracking initialised max=8.00 GiB low_water=6.00 GiB
2025-09-01T15:11:17Z INFO arti_client::client: Using keystore from "/home/alex/.local/share/arti/keystore"
2025-09-01T15:11:17Z INFO tor_dirmgr: Marked consensus usable.
2025-09-01T15:11:17Z INFO tor_dirmgr: Loaded a good directory from cache.
2025-09-01T15:11:17Z INFO arti::subcommands::proxy: Sufficiently bootstrapped; system SOCKS now functional.
2025-09-01T15:11:17Z INFO arti::socks: Listening on [::1]:9150.
2025-09-01T15:11:17Z INFO arti::socks: Listening on 127.0.0.1:9150.
2025-09-01T15:11:17Z INFO tor_dirmgr: Marked consensus usable.
2025-09-01T15:11:17Z INFO tor_dirmgr: Directory is complete. attempt=1
2025-09-01T15:11:17Z INFO tor_guardmgr::guard: We have found that guard [scrubbed] is usable.
2025-09-01T15:11:18Z INFO arti::reload_cfg: Successfully reloaded configuration.
2025-09-01T15:11:28Z INFO tor_guardmgr::guard: We have found that guard [scrubbed] is usable.
shell 2 g3proxy
/datadisk/git-repos/g3 $
# target/debug/g3proxy --config-file g3proxy/examples/chain_socks_proxy/g3proxy.yaml
Now can you configure the Browser to us the http proxy on 127.0.0.1:10087
and you can run a test with curl
--- config: theme: neutral --- flowchart LR A[`curl`] -->|`127.0.0.1:10087`| B[g3] -->|`SOCKS`| C[arti] --> D[TOR-Network] -->|`https`| G[https://check.torproject.org/]
shell 3
# curl -sSL \
--proxy 127.0.0.1:10087 \
https://check.torproject.org/ \
|egrep -i cong
Congratulations. This browser is configured to use Tor.
Congratulations. This browser is configured to use Tor.
some thoughts๐
As curl supports also the SOCKS protocol can you tell curl to use the SOCKS protocol, but there are some applications out there which do not support SOCKS protocol but HTTP protocol for proxying requests, for such applications are this setup helpful.
In the World are also some other tools out there which supports HTTPSโ>SOCKS transformation like privoxyโs forward-socks5. I choose g3 just because itโs quite small and written in rust ๐.