This guide demonstrates how to set up i2pd as a netvm, allowing you to easily proxy traffic through the i2p network to access the clearnet or i2p services. This significantly enhances security and privacy.
This method is an improved implementation compared to https://forum.qubes-os.org/t/i2pd-netvm-guide/31402, utilizing debian-12 and avoiding the outdated i2pd-qt and archlinux community template.
Execute the following commands within the debian-12-xfce-i2pd
:
sudo apt install wget
wget -q -O - https://repo.i2pd.xyz/.help/add_repo | sudo bash -s -
sudo apt update
sudo apt install i2pd
Visit https://github.com/clash-verge-rev/clash-verge-rev/releases to find the appropriate version of clash-verge-rev. This guide uses the latest stable version, v2.0.2. Ensure your debian-12-xfce-i2pd VM has a suitable netvm configured for internet access (you can download the .deb in another VM and transfer it to debian-12-xfce-i2pd).
wget https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v2.0.2/Clash.Verge_2.0.2_amd64.deb
sudo apt install ./Clash.Verge_2.0.2_amd64.deb
shutdown now
sys-i2pd-out
Execute the following commands within sys-i2pd-out:
sudo systemctl enable i2pd.service
sudo nft add rule ip qubes custom-input meta l4proto tcp ct state new,established tcp dport 4500 accept
Wait 10-20 minutes for i2pd to start accepting connections.
In another terminal tab, run the following command for simple monitoring:
watch curl --socks5-hostname 127.0.0.1:4447 acetone.i2p
/rw/config/rc.local
:#!/bin/bash
sudo nft add rule ip qubes custom-input meta l4proto tcp ct state new,established tcp dport 4500 accept
/rw/config/qubes-bind-dirs.d/50_user.conf
:
binds+=( '/etc/i2pd' )
/etc/i2pd/tunnels.conf
:[socks-outproxy-tcp]
type = client
address = 0.0.0.0
port = 4500
keys = transient-outproxy
destination = outproxy.acetone.i2p
destinationport = 1080
inbound.length = 1
outbound.length = 1
inbound.lengthVariance = 1
outbound.lengthVariance = 1
[socks-outproxy-udp]
type = udpclient
address = 127.0.0.1
port = 4500
keys = transient-outproxy
destination = outproxy.acetone.i2p
destinationport = 1080
You can modify some of these parameters if you need to use a different outproxy.
[socksproxy]
section of /etc/i2pd/i2pd.conf
:outproxy.enabled = true
outproxy = 127.0.0.1
outproxyport = 4500
sys-i2pd-in
Open a terminal and type clash-verge
to launch the application.
Profiles > New
Local
as the type and save.
MRB > Edit Proxies
.
socks5://<YOUR_IP>:4500
and save.
Proxies > Global
.
Setting > System Setting > Auto Launch
.Execute the following commands in dom0:
qvm-firewall sys-i2pd-in reset
qvm-firewall sys-i2pd-in add accept <sys-i2pd-out-ip-here> dstports=4500 proto=tcp
qvm-firewall sys-i2pd-in del --rule-no 0
Create a new test VM and select sys-i2pd-in as its netvm to verify network functionality. You should be able to access both .i2p services and the clearnet.
I'm still considering this.
Welcome to join! https://matrix.to/#/#chat:qubes.live