1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# vi: set ft=ruby :
# frozen_string_literal: true
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.require_version '>= 2.2.6'
Vagrant.configure('2') do |config|
config.vm.box = 'generic/debian10'
config.vm.box_version = '4.0.4'
config.vm.box_check_update = false
config.vm.hostname = 'i2ptun'
# ssh
config.ssh.insert_key = true
config.ssh.keep_alive = true
config.ssh.keys_only = true
# timeouts
config.vm.boot_timeout = 300
config.vm.graceful_halt_timeout = 60
config.ssh.connect_timeout = 15
# shares
config.vm.synced_folder '.', '/vagrant', type: 'nfs', nfs_version: 4, nfs_udp: false
# network
# 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.vagrant.plugins = [{ 'vagrant-libvirt' => { 'version' => '^0.6.2' } }]
config.vm.provider 'libvirt' do |libvirt|
libvirt.default_prefix = 'i2ptun-'
libvirt.driver = 'kvm'
libvirt.memory = '3076'
libvirt.cpus = 2
libvirt.sound_type = nil
# libvirt.qemuargs value: '-nographic'
libvirt.qemuargs value: '-nodefaults'
libvirt.qemuargs value: '-no-user-config'
libvirt.random model: 'random'
end
# 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
# deb-src https://deb.i2p2.de/ buster main
# curl -o i2p-debian-repo.key.asc https://geti2p.net/_static/i2p-debian-repo.key.asc
# gpg -n --import --import-options import-show i2p-debian-repo.key.asc
# sudo apt-key add i2p-debian-repo.key.asc
# 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
config.vm.provision 'firefox', after: 'i2p-config-copy', type: 'shell', privileged: false, name: 'firefox',
reboot: false, inline: <<-SHELL
sudo apt-get install -y firefox-esr xauth xorg i2pd
SHELL
end
|