Skip to content

Commit 30b28a3

Browse files
Henry Birge-LeeHenry Birge-Lee
authored andcommitted
Added proxy functionality.
1 parent 5acce8b commit 30b28a3

File tree

16 files changed

+193
-38
lines changed

16 files changed

+193
-38
lines changed

.DS_Store

12 KB
Binary file not shown.

bash-verify-commands.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bash -c "expect ./prefix-route.sh 184.164.227.1" > bashout.out

ca/.DS_Store

8 KB
Binary file not shown.

cmd/boulder-va/main.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ type config struct {
4242

4343
// Feature flag to enable enforcement of CAA SERVFAILs.
4444
CAASERVFAILExceptions string
45+
46+
// A list of proxy urls
47+
ProxyURLList []string
4548
}
4649

4750
Statsd cmd.StatsdConfig
@@ -125,7 +128,13 @@ func main() {
125128
resolver = r
126129
}
127130

131+
var proxyList = c.VA.ProxyURLList
132+
if proxyList == nil {
133+
proxyList = []string{""}
134+
}
135+
128136
vai := va.NewValidationAuthorityImpl(
137+
proxyList,
129138
pc,
130139
sbc,
131140
cdrClient,

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ boulder:
22
build: .
33
dockerfile: Dockerfile
44
environment:
5-
FAKE_DNS: 127.0.0.1
5+
FAKE_DNS: 192.168.99.1
66
PKCS11_PROXY_SOCKET: tcp://boulder-hsm:5657
77
volumes:
88
- $GOPATH:/go/

prefix-route.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/expect #Where the script should be run from.
2+
3+
set ip [lindex $argv 0]
4+
5+
#If it all goes pear shaped the script will timeout after 20 seconds.
6+
set timeout 20
7+
#First argument is assigned to the variable name
8+
set name route-views.routeviews.org
9+
#Second argument is assigned to the variable user
10+
set user rviews
11+
#Third argument is assigned to the variable password
12+
set password rviews
13+
#This spawns the telnet program and connects it to the variable name
14+
spawn telnet $name
15+
#The script expects login
16+
expect "Username:"
17+
#The script sends the user variable
18+
send "$user\r"
19+
20+
send "terminal length 0\r"
21+
send "show ip bgp $ip\r"
22+
send "exit\r"
23+
24+
#This hands control of the keyboard over two you (Nice expect feature!)
25+
interact
26+
27+
exit

test.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,6 @@ function run_unit_tests() {
111111

112112
#
113113
# Run Go Vet, a correctness-focused static analysis tool
114-
#
115-
if [[ "$RUN" =~ "vet" ]] ; then
116-
start_context "vet"
117-
run_and_expect_silence go vet ${TESTPATHS}
118-
end_context #vet
119-
fi
120114

121115
#
122116
# Ensure all files are formatted per the `go fmt` tool

test/.DS_Store

10 KB
Binary file not shown.

test/config-next/ra.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
},
7979

8080
"common": {
81-
"dnsResolver": "127.0.0.1:8053",
81+
"dnsResolver": "8.8.8.8:53",
8282
"dnsTimeout": "1s",
8383
"dnsAllowLoopbackAddresses": true
8484
}

test/config-next/va.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"userAgent": "boulder",
55
"debugAddr": ":8004",
66
"portConfig": {
7-
"httpPort": 5002,
7+
"httpPort": 80,
88
"httpsPort": 5001,
99
"tlsPort": 5001
1010
},
@@ -38,7 +38,7 @@
3838
},
3939

4040
"common": {
41-
"dnsResolver": "127.0.0.1:8053",
41+
"dnsResolver": "8.8.8.8:53",
4242
"dnsTimeout": "1s",
4343
"dnsAllowLoopbackAddresses": true
4444
}

0 commit comments

Comments
 (0)