aboutsummaryrefslogtreecommitdiffstats
path: root/i2p
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--i2p/Vagrantfile67
-rw-r--r--i2p/clients.config75
-rw-r--r--i2p/wrapper.config250
3 files changed, 360 insertions, 32 deletions
diff --git a/i2p/Vagrantfile b/i2p/Vagrantfile
index bbf86b5..0a1b32d 100644
--- a/i2p/Vagrantfile
+++ b/i2p/Vagrantfile
@@ -1,14 +1,12 @@
-# frozen_string_literal: true
-
# -*- mode: ruby -*-
# vi: set ft=ruby :
-# ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox'
-Vagrant.require_version '>= 2.2.6'
-Vagrant.configure('2') do |config|
- config.vm.box = 'bento/debian-10'
- config.vm.box_version = '= 202105.25.0'
+
+Vagrant.require_version ">= 2.2.6"
+Vagrant.configure("2") do |config|
+ config.vm.box = "bento/debian-10"
+ config.vm.box_version = "202107.08.0"
config.vm.box_check_update = false
- config.vm.hostname = 'i2pvm'
+ config.vm.hostname = "i2ptun"
# ssh
config.ssh.insert_key = true
@@ -20,36 +18,32 @@ Vagrant.configure('2') do |config|
config.vm.graceful_halt_timeout = 60
config.ssh.connect_timeout = 15
- config.vagrant.plugins = ['vagrant-vbguest']
+ config.vagrant.plugins = ["vagrant-vbguest"]
config.vbguest.no_install = true
+ # shares
+ config.vm.synced_folder ".", "/vagrant"
+
# network
- config.vm.network 'forwarded_port', guest: 4444, host: 4445, id: 'i2ptun', protocol: 'tcp'
- config.vm.network 'forwarded_port', guest: 4444, host: 4445, id: 'i2ptun', protocol: 'udp'
+ config.vm.network "forwarded_port", guest: 4444, host: 4444, id: "i2ptunudp", protocol: "udp"
+ config.vm.network "forwarded_port", guest: 4444, host: 4444, id: "i2ptuntcp", protocol: "tcp"
+ config.vm.network "forwarded_port", guest: 4445, host: 4445, id: "i2ptunhttpsudp", protocol: "udp"
+ config.vm.network "forwarded_port", guest: 4445, host: 4445, id: "i2ptunhttpstcp", protocol: "tcp"
+ config.vm.network "forwarded_port", guest: 6668, host: 6668, id: "i2ptunircudp", protocol: "udp"
+ config.vm.network "forwarded_port", guest: 6668, host: 6668, id: "i2ptunirctcp", protocol: "tcp"
+ config.vm.network "forwarded_port", guest: 7654, host: 7654, id: "i2ptuni2pudp", protocol: "udp"
+ config.vm.network "forwarded_port", guest: 7654, host: 7654, id: "i2ptuni2ptcp", protocol: "tcp"
+ config.vm.network "forwarded_port", guest: 7657, host: 7657, id: "i2ptunadminudp", protocol: "udp"
+ config.vm.network "forwarded_port", guest: 7657, host: 7657, id: "i2ptunadmintcp", protocol: "tcp"
- config.vm.provider 'libvirt' do |libvirt|
- libvirt.driver = 'kvm'
- libvirt.machine_type = 'pc-q35-3.1'
- libvirt.qemuargs value: '-device'
- libvirt.qemuargs value: 'virtio-rng-pci,rng=rng0'
- libvirt.qemuargs value: '-object'
- libvirt.qemuargs value: 'rng-random,id=rng0,filename=/dev/urandom'
- libvirt.qemuargs value: '-nographic'
- libvirt.qemuargs value: '-nodefaults'
- libvirt.qemuargs value: '-no-user-config'
- libvirt.qemuargs value: '-cpu'
- libvirt.qemuargs value: 'host'
- libvirt.qemuargs value: '-enable-kvm'
- libvirt.memory = '768'
- libvirt.cpus = '1'
- end
- config.vm.provider 'virtualbox' do |vb|
- vb.gui = false
- vb.memory = '768'
- vb.cpus = 1
+ config.vm.provider "virtualbox" do |vb|
+ vb.gui = false
+ vb.memory = "768"
+ vb.cpus = 1
+ # vb.name = "i2ptun"
end
- config.vm.provision 'shell', inline: <<-SHELL
+ config.vm.provision "i2p-install",type: "shell", name: "i2p-install", inline: <<-SHELL
sudo apt update && sudo apt upgrade -y
sudo apt install -y apt-transport-https curl lynx w3m vim tmux
maindeb https://deb.i2p2.de/ buster
@@ -60,5 +54,14 @@ Vagrant.configure('2') do |config|
sudo apt update
sudo apt install -y i2p
# sudo dpkg-reconfigure i2p
+ # i2prouter install && i2prouter start
+ SHELL
+
+ config.vm.provision "i2p-config-copy",after: "i2p-install", type: "shell", privileged: false, name: "i2p-config-copy", reboot: false, inline: <<-SHELL
+ sudo cp /vagrant/clients.config /var/lib/i2p/i2p-config/clients.config
+ sudo cp /vagrant/wrapper.config /etc/i2p/wrapper.config
+ sudo systemctl enable i2p
+ sudo systemctl start i2p
+ i2prouter restart
SHELL
end
diff --git a/i2p/clients.config b/i2p/clients.config
new file mode 100644
index 0000000..9b1fcfb
--- /dev/null
+++ b/i2p/clients.config
@@ -0,0 +1,75 @@
+# Modified by I2P User dir migration script
+# NOTE: This I2P config file must use UTF-8 encoding
+#
+# If you have a 'split' directory installation, with configurap (Lintion
+# files in ~/.i2ux), %APPDATA%\I2P (Windows),
+# or /Users/(user)/Library/Application Support/i2p (Mac), be sure to
+# edit the file in the configuration directory, NOT the install directory.
+# When running as a Linux daemon, the configuration directory is /var/lib/i2p
+# and the install directory is /usr/share/i2p .
+# When running as a Windows service, the configuration directory is \ProgramData\i2p
+# and the install directory is \Program Files\i2p .
+#
+
+# fire up the web console
+## There are several choices, here are some examples:
+## non-SSL, bind to local IPv4 only
+#clientApp.0.args=7657 127.0.0.1 ./webapps/
+## non-SSL, bind to local IPv6 only
+#clientApp.0.args=7657 ::1 ./webapps/
+## non-SSL, bind to all IPv4 addresses
+clientApp.0.args=7657 0.0.0.0 ./webapps/
+## non-SSL, bind to all IPv6 addresses
+#clientApp.0.args=7657 :: ./webapps/
+## For SSL only, change clientApp.4.args below to https://
+## SSL only
+#clientApp.0.args=-s 7657 ::1,127.0.0.1 ./webapps/
+## non-SSL and SSL
+#clientApp.0.args=7657 ::1,127.0.0.1 -s 7667 ::1,127.0.0.1 ./webapps/
+## non-SSL only, both IPv6 and IPv4 local interfaces
+#clientApp.0.args=7657 ::1,127.0.0.1 ./webapps/
+clientApp.0.main=net.i2p.router.web.RouterConsoleRunner
+clientApp.0.name=I2P Router Console
+clientApp.0.onBoot=true
+clientApp.0.startOnLoad=true
+
+# SAM bridge
+clientApp.1.main=net.i2p.sam.SAMBridge
+clientApp.1.name=SAM application bridge
+clientApp.1.args=sam.keys 127.0.0.1 7656 i2cp.tcp.host=127.0.0.1 i2cp.tcp.port=7654
+clientApp.1.startOnLoad=false
+
+# poke the i2ptunnels defined in i2ptunnel.config
+clientApp.2.main=net.i2p.i2ptunnel.TunnelControllerGroup
+clientApp.2.name=Application tunnels
+clientApp.2.args=i2ptunnel.config
+clientApp.2.delay=35
+clientApp.2.startOnLoad=true
+
+# run our own eepsite with a seperate jetty instance
+clientApp.3.main=net.i2p.jetty.JettyStart
+clientApp.3.name=I2P webserver (eepsite)
+## To use the rewrite handler, edit jetty-rewrite.xml and use:
+#clientApp.3.args="/path/to/jetty.xml" "/path/to/jetty-rewrite.xml"
+## To use local SSL, edit j.xml andetty-ssl use:
+#clientApp.3.args="/path/to/jetty.xml" "/path/to/jetty-ssl.xml"
+## To use local or remote JMX, edit jetty-jmx.xml and use:
+#clientApp.3.args="/path/to/jetty.xml" "/path/to/jetty-jmx.xml"
+clientApp.3.args="/var/lib/i2p/i2p-config/eepsite/jetty.xml"
+clientApp.3.delay=30
+clientApp.3.startOnLoad=true
+
+# load a browser pointing at the web console whenever we start up
+clientApp.4.main=net.i2p.apps.systray.UrlLauncher
+clientApp.4.name=Open Router Console in web browser at startup
+clientApp.4.args=http://127.0.0.1:7657/
+clientApp.4.delay=3
+clientApp.4.startOnLoad=false
+
+# BOB bridge
+clientApp.5.args=
+clientApp.5.delay=10
+clientApp.5.main=net.i2p.BOB.BOB
+clientApp.5.name=BOB application bridge
+clientApp.5.startOnLoad=false
+
diff --git a/i2p/wrapper.config b/i2p/wrapper.config
new file mode 100644
index 0000000..ca30fd6
--- /dev/null
+++ b/i2p/wrapper.config
@@ -0,0 +1,250 @@
+#encoding=UTF-8
+##********************************************************************
+## Wrapper Properties
+##
+## WARNING - for any changes to take effect, you must completely
+## stop the router and the wrapper. Clicking 'Restart' on your
+## router console will NOT reread this file! You must
+## click "Shutdown", wait 11 minutes, then start i2p.
+##
+## WARNING - The wrapper is NOT run (and this file is not used)
+## if you start I2P with the i2prouter-nowrapper script in Linux.
+## Use i2prouter or the initscript to run the wrapper.
+##
+## NOTE - Directory organization:
+## The standard I2P Installation will set up a "split" directory structure
+## with code in the install directory, data and configuration files in the
+## user's home directory, and temporary files in the system temporary directory.
+##
+##********************************************************************
+# Java Application
+wrapper.java.command=java
+# Specify a specific java binary:
+#set.JAVA_HOME=/java/path
+#wrapper.java.command=%JAVA_HOME%/bin/java
+# Gentoo uses the following:
+#wrapper.java.command=/etc/java-config-2/current-system-vm/bin/java
+#
+# Tell the Wrapper to log the full generated Java command line.
+#wrapper.java.command.loglevel=INFO
+##
+## PORTABLE installation:
+# A portable Java installation can be configured thusly:
+#set.JAVA_HOME=C:\path\to\your\portable\java\installation
+#wrapper.java.command=%JAVA_HOME\bin\java.exe
+##
+
+# Java Main class. This class must implement the WrapperListener interface
+# or guarantee that the WrapperManager class is initialized. Helper
+# classes are provided to do this for you. See the Integration section
+# of the documentation for details.
+wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
+
+# Java Classpath (include wrapper.jar) Add class path elements as
+# needed starting from 1
+#
+# Doing it this way means we can add new apps without asking people
+# to update their wrapper.config.
+# The downside is that we lose control over classpath order,
+# This is fine for new installs (where the uninstall jars
+# copy.jar, delete.jar, and exec.jar containing duplicate FileUtil
+# classes, or all the classes of i2p.jar, are in a different directory).
+# Be sure there are no other duplicate classes.
+#
+wrapper.java.classpath.1=/usr/share/i2p/lib/*.jar
+wrapper.java.classpath.2=/usr/share/java/wrapper.jar
+# uncomment this to use the system classpath as well (e.g. to get tools.jar)
+# wrapper.java.classpath.3=%CLASSPATH%
+
+# Java Library Path (location of libjbigi/libjcpuid)
+wrapper.java.library.path.1=/usr/lib/jni
+wrapper.java.library.path.2=/usr/share/java/lib
+
+# Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
+wrapper.java.additional.auto_bits=TRUE
+
+# Java Additional Parameters
+# Numbers must be consecutive (except for stripquotes)
+wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt
+wrapper.java.additional.2=-Di2p.dir.base=/usr/share/i2p
+wrapper.java.additional.2.stripquotes=TRUE
+
+# Prevent the JVM from exporting stats (and thereby causing hundreds of
+# ms long pauses during GC)
+# http://www.evanjones.ca/jvm-mmap-pause.html
+#wrapper.java.additional.3=-XX:+PerfDisableSharedMem
+
+# On some IPv6 enabled systems, I2P and other network-enabled java applications
+# may fail to start. For examples see
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560044.
+# Two things that may help if you experience this issue
+# 1) "echo 0 > /proc/sys/net/ipv6/bindv6only" as root; or
+# 2) uncomment the next two lines:
+#wrapper.java.additional.3=-Djava.net.preferIPv4Stack=true
+#wrapper.java.additional.4=-Djava.net.preferIPv6Addresses=false
+
+# Jetty says this is a security risk
+# Uncommenting this won't help as the router forces it to true
+# If you really need this, you have to set it in jetty.xml
+# somehow - not sure exactly but here's a clue:
+# org.mortbay.util.FileResource.setCheckAliases(false)
+# wrapper.java.additional.8=-Dorg.mortbay.util.FileResource.checkAliases=false
+# PORTABLE installation:
+# uncomment the following
+#wrapper.java.additional.3=-Di2p.dir.pid="$INSTALL_PATH"
+#wrapper.java.additional.3.stripquotes=TRUE
+#wrapper.java.additional.4=-Di2p.dir.temp="$INSTALL_PATH"
+#wrapper.java.additional.4.stripquotes=TRUE
+#wrapper.java.additional.5=-Di2p.dir.config="$INSTALL_PATH"
+#wrapper.java.additional.5.stripquotes=TRUE
+#
+# Uncomment this for better performance.
+# If it doesn't work, server mode is not available in your JVM.
+# This may not be required if your machine is already "server-class".
+# See http://java.sun.com/j2se/1.5.0/docs/guide/vm/server-class.html
+#wrapper.java.additional.5=-server
+
+# Initial Java Heap Size (in MB)
+#wrapper.java.initmemory=4
+
+# Maximum Java Heap Size (in MB)
+# The JVM's default is 64MB, and I2P can work fine in that, but to handle
+# lots of I2PSnark activity in the same JVM, increasing the default max heap
+# size should help. Feel free to reduce this if not using I2PSnark in the jvm
+# High-bandwidth routers may need to increase to 512 or more.
+#
+# WARNING - for any changes to take effect, you must completely
+# stop the router and the wrapper. Clicking 'Restart' on your
+# router console will NOT reread this file! You must
+# click "Shutdown", wait 11 minutes, then start i2p.
+#
+wrapper.java.maxmemory=128
+
+# Application parameters. Add parameters as needed starting from 1
+wrapper.app.parameter.1=net.i2p.router.Router
+
+#********************************************************************
+# Wrapper Logging Properties
+#********************************************************************
+# Enables Debug output from the Wrapper.
+# wrapper.debug=TRUE
+# Format of output for the console. (See docs for formats)
+wrapper.console.format=PM
+
+# Log Level for console output. (See docs for log levels)
+wrapper.console.loglevel=INFO
+
+# Log file to use for wrapper output logging.
+# You may wish to change this.
+# NOTE: On Linux/Mac this is overridden in the i2prouter script; changes here will have no effect.
+# System temp directory:
+#wrapper.logfile=/tmp/wrapper.log
+
+# Format of output for the log file.
+# The format consists of the tokens 'L' for log level, 'P' for prefix, 'D' for thread,
+# 'T' for time, 'Z' for millisecond time, and 'M' for message
+# Unfortunately the log timezone cannot be changed, see
+# http://www.nabble.com/Log-message-timezone-td23651317.html
+wrapper.logfile.format=TM
+
+# Log Level for log file output. (See docs for log levels)
+wrapper.logfile.loglevel=INFO
+
+# Maximum size that the log file will be allowed to grow to before
+# the log is rolled. Size is specified in bytes. The default value
+# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
+# 'm' (mb) suffix. For example: 10m = 10 megabytes.
+wrapper.logfile.maxsize=4m
+
+# Maximum number of rolled log files which will be allowed before old
+# files are deleted. The default value of 0 implies no limit.
+wrapper.logfile.maxfiles=2
+
+# Log Level for sys/event log output. (See docs for log levels)
+wrapper.syslog.loglevel=NONE
+
+# these will shut down or crash the JVM
+wrapper.signal.mode.usr1=IGNORE
+wrapper.signal.mode.usr2=IGNORE
+
+# choose what to do if the JVM kills itself based on the exit code
+wrapper.on_exit.default=SHUTDOWN
+wrapper.on_exit.0=SHUTDOWN
+wrapper.on_exit.1=SHUTDOWN
+# OOM
+wrapper.on_exit.10=RESTART
+# graceful shutdown
+wrapper.on_exit.2=SHUTDOWN
+# hard shutdown
+wrapper.on_exit.3=SHUTDOWN
+# hard restart
+wrapper.on_exit.4=RESTART
+# hard restart
+wrapper.on_exit.5=RESTART
+
+# the router may take a few seconds to save state, etc
+wrapper.jvm_exit.timeout=60
+
+# give the OS 60s to clear all the old sockets / etc before restarting
+# Let's change the default from 60 to 15 seconds and see if anyone moans..
+wrapper.restart.delay=15
+
+wrapper.ping.interval=300
+# The ping timeout must be at least 5 seconds longer than the value of wrapper.ping.interval.
+# Extend this if you are getting 'JVM appears hung' shutdowns.
+wrapper.ping.timeout=320
+
+# use the wrapper's internal timer thread. otherwise this would
+# force a restart of the router during daylight savings time as well
+# as any time that the OS clock changes
+wrapper.use_system_time=false
+
+# pid file for the JVM
+# If you plan to have multiple wrappers running on the same machine,
+# you should copy this file, change the location or file name,
+# and edit the i2prouter script to change the WRAPPER_CONF setting
+# to point to the new wrapper.config location.
+# Windows users may wish to uncomment.
+# Linux/Mac users, do not set here, see settings in the i2prouter script.
+# Directory must exist or the wrapper will fail to start.
+# System temp directory:
+#wrapper.java.pidfile=/tmp/routerjvm.pid
+#
+# From i2prouter:
+#
+# PIDDIR="."
+# APP_NAME="i2p"
+# PIDFILE="$PIDDIR/$APP_NAME.pid"
+#
+# This means i2prouter looks for './i2p.pid'.
+# See comments above for wrapper.java.pidfile
+# Windows users may wish to uncomment.
+# Linux/Mac users, do not set here, see settings in the i2prouter script.
+# Directory must exist or the wrapper will fail to start.
+# System temp directory:
+#wrapper.pidfile=/tmp/i2p.pid
+
+#********************************************************************
+# Wrapper General Properties
+#********************************************************************
+# Allow for the use of non-contiguous numbered properties
+wrapper.ignore_sequence_gaps=TRUE
+
+# Title to use when running as a console
+wrapper.console.title=I2P Service
+
+# Set permissions used when creating files
+# See http://wrapper.tanukisoftware.com/doc/english/prop-umask.html
+# for a detailed explanation of these settings.
+wrapper.umask=0022
+wrapper.java.umask=0022
+wrapper.logfile.umask=0077
+
+# http://wrapper.tanukisoftware.com/doc/english/prop-check-deadlock.html
+# requires wrapper 3.5.0 or higher
+# interval is seconds
+wrapper.check.deadlock=TRUE
+wrapper.check.deadlock.interval=3699
+wrapper.check.deadlock.action=DUMP,RESTART
+wrapper.check.deadlock.output=FULL
+