-
Notifications
You must be signed in to change notification settings - Fork 0
/
dnstt_client_setup.bash
56 lines (53 loc) · 2.69 KB
/
dnstt_client_setup.bash
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
#!/bin/bash
echo "[+] Installing DoH-client for transparent UDP to DoH conversion"
# Install Scenario dependencies
sudo apt update
sudo apt-get install -y sshpass asciinema
# Install GO
curl -OL https://golang.org/dl/go1.16.7.linux-amd64.tar.gz
sudo tar -C /usr/local -xvf go1.16.7.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version
mkdir ~/gopath
export GOPATH=~/gopath
# Install DNSTT
git clone https://www.bamsoftware.com/git/dnstt.git
cd dnstt/dnstt-client
go build
# Add DoH-server's self-signed certificate to OS certificate store so GO can find it.
# https://stackoverflow.com/questions/40051213/where-is-golang-picking-up-root-cas-from/40051432#40051432
cat << EOF >> /etc/ssl/certs/ca-certificates.crt
-----BEGIN CERTIFICATE-----
MIIFqDCCA5CgAwIBAgIUYnQfjP+J+MOrPMu7q5vBqOEOKNcwDQYJKoZIhvcNAQEL
BQAwWzELMAkGA1UEBhMCRUUxETAPBgNVBAgMCEhhcmp1bWFhMRAwDgYDVQQHDAdU
YWxsaW5uMRAwDgYDVQQKDAdUYWxUZWNoMRUwEwYDVQQDDAwxOTIuMTY4LjAuMTAw
HhcNMjIwNTA3MDgyNDI0WhcNMjMwNTA3MDgyNDI0WjBbMQswCQYDVQQGEwJFRTER
MA8GA1UECAwISGFyanVtYWExEDAOBgNVBAcMB1RhbGxpbm4xEDAOBgNVBAoMB1Rh
bFRlY2gxFTATBgNVBAMMDDE5Mi4xNjguMC4xMDCCAiIwDQYJKoZIhvcNAQEBBQAD
ggIPADCCAgoCggIBAM/Luv5d02tONIA7XR4tnh4OR+8f4ghEy0hJi5s5x8opZL2X
z9nldjelnJ4nQANzMwsd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