-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
44 lines (33 loc) · 948 Bytes
/
Vagrantfile
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
# path to wg0.conf, mount it to /srv/wg0.conf
HOST_PATH = '/Users/xatier/wg/'
GUEST_PATH = '/srv/'
PORT = 1081
Vagrant.configure("2") do |config|
config.vm.box = "archlinux/archlinux"
config.vm.hostname = 'wg'
config.vm.synced_folder HOST_PATH, GUEST_PATH
config.vm.network :forwarded_port, guest: PORT, host: PORT
config.vm.provision "shell", privileged: false, inline: <<-SHELL
set -x -euo pipefail
sudo pacman -Syuu --noconfirm --needed \
git \
go \
mtr \
pacman-contrib \
python \
sudo \
vim \
wget \
wireguard-tools
sudo wg-quick up /srv/wg0.conf
curl -Ss ipinfo.io
rm -rf toy-socks5
git clone https://github.com/xatier/toy-socks5.git
cd toy-socks5
go build
SHELL
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--cpus", 1]
v.customize ["modifyvm", :id, "--memory", 256]
end
end