Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
auto_https off
}

localhost:8443 {
tls /tmp/lab4-cert.pem /tmp/lab4-key.pem {
protocols tls1.2 tls1.3
}
reverse_proxy localhost:8080
}
55 changes: 55 additions & 0 deletions submissions/lab4-tls-handshake.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
CONNECTED(00000003)
>>> TLS 1.0, RecordHeader [length 0005]
16 03 01 00 c9
>>> TLS 1.2, Handshake [length 00c9], ClientHello
01 00 00 c5 03 03 bb 3c e1 41 21 fe ff 86 ec 0c
75 3f 55 59 87 7d b6 15 9e 04 f1 53 d8 41 4b 7f
5b c8 1c 11 7c 76 00 00 38 c0 2c c0 30 00 9f cc
a9 cc a8 cc aa c0 2b c0 2f 00 9e c0 24 c0 28 00
6b c0 23 c0 27 00 67 c0 0a c0 14 00 39 c0 09 c0
13 00 33 00 9d 00 9c 00 3d 00 3c 00 35 00 2f 00
ff 01 00 00 64 00 00 00 0e 00 0c 00 00 09 6c 6f
63 61 6c 68 6f 73 74 00 0b 00 04 03 00 01 02 00
0a 00 0c 00 0a 00 1d 00 17 00 1e 00 19 00 18 00
23 00 00 00 16 00 00 00 17 00 00 00 0d 00 2a 00
28 04 03 05 03 06 03 08 07 08 08 08 09 08 0a 08
0b 08 04 08 05 08 06 04 01 05 01 06 01 03 03 03
01 03 02 04 02 05 02 06 02
<<< TLS 1.2, RecordHeader [length 0005]
16 03 03 00 3f
<<< TLS 1.2, Handshake [length 003f], ServerHello
02 00 00 3b 03 03 9f 44 40 e0 e7 f2 78 cd 76 b4
30 98 da dd 98 98 f5 d6 bf c3 27 b8 2e 65 44 4f
57 4e 47 52 44 01 00 c0 2f 00 00 13 00 23 00 00
ff 01 00 01 00 00 17 00 00 00 0b 00 02 01 00
<<< TLS 1.2, RecordHeader [length 0005]
16 03 03 03 17
<<< TLS 1.2, Handshake [length 0317], Certificate
0b 00 03 13 00 03 10 00 03 0d 30 82 03 09 30 82
01 f1 a0 03 02 01 02 02 14 07 a7 41 a9 4f 79 65
b1 52 0f 21 e7 c4 6e bf 69 d9 47 30 b6 30 0d 06
09 2a 86 48 86 f7 0d 01 01 0b 05 00 30 14 31 12
30 10 06 03 55 04 03 0c 09 6c 6f 63 61 6c 68 6f
73 74 30 1e 17 0d 32 36 30 36 31 37 31 35 34 33
33 35 5a 17 0d 32 37 30 36 31 37 31 35 34 33 33
35 5a 30 14 31 12 30 10 06 03 55 04 03 0c 09 6c
6f 63 61 6c 68 6f 73 74 30 82 01 22 30 0d 06 09
2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01 0f 00
30 82 01 0a 02 82 01 01 00 db 78 c1 66 20 b8 4f
7a 8e 63 da a2 ad d0 00 41 13 e4 7b 75 06 d5 df
ca 77 c3 7d 6b 90 13 bf d1 30 f6 17 1f 36 25 b2
5f cb e0 61 df 1e c1 f2 f5 65 f4 85 51 2a 82 e2
ca 50 68 9c fe 35 6a 48 f6 82 52 0e cd 80 4f ce
ec bc 55 e9 8b 6d 13 cf 7a 49 0a 6c 42 10 ae 18
9a d7 07 e3 53 34 e2 89 56 b7 be 47 1b 68 55 5f
cc 1f c3 91 77 2b f3 71 8b b2 f9 2f 36 3e 74 3a
ed 8a 94 45 14 b0 65 ac bc 3e 57 c8 78 90 3e 56
68 0a 79 76 e5 3e 59 b4 0b c6 58 e1 01 71 3f 4d
a1 ca 55 c7 f9 f0 c1 3c 42 93 3e 10 21 df 4b c2
4f 57 f1 fe 13 94 d2 7a 9f 4e a1 af ae a8 cf 01
20 a3 76 fd 04 a5 78 da 75 18 c8 8b 73 c4 d0 27
7c 63 b4 45 62 3b b5 41 50 7d a3 69 ab f9 e6 05
0e e6 f5 58 b0 0f 44 29 02 db 6a 9b ae 96 10 b7
56 96 08 58 3d 2a 15 98 97 ae 18 2d 9a 30 01 d5
d4 df 7d 1c d3 78 52 48 d3 02 03 01 00 01 a3 53
30 51 30 1d 06 03 55 1d 0e 04 16 04 14 6a 21 09
78 changes: 78 additions & 0 deletions submissions/lab4-trace.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
22:26:03.768337 IP6 ::1.35392 > ::1.8080: Flags [S], seq 2609277124, win 65476, options [mss 65476,sackOK,TS val 2165058868 ecr 0,nop,wscale 7], length 0
`..=.(.@.................................@....h..........0.........
..-4........
22:26:03.768391 IP6 ::1.8080 > ::1.35392: Flags [S.], seq 1357679227, ack 2609277125, win 65464, options [mss 65476,sackOK,TS val 2165058868 ecr 2165058868,nop,wscale 7], length 0
`....(.@...................................@P..{..h......0.........
..-4..-4....
22:26:03.768406 IP6 ::1.35392 > ::1.8080: Flags [.], ack 1, win 512, options [nop,nop,TS val 2165058868 ecr 2165058868], length 0
`..=. .@.................................@....h.P..|.....(.....
..-4..-4
22:26:03.768747 IP6 ::1.35392 > ::1.8080: Flags [P.], seq 1:175, ack 1, win 512, options [nop,nop,TS val 2165058869 ecr 2165058868], length 174: HTTP: POST /notes HTTP/1.1
`..=...@.................................@....h.P..|...........
..-5..-4POST /notes HTTP/1.1
Host: localhost:8080
User-Agent: curl/8.5.0
Accept: */*
Content-Type: application/json
Content-Length: 39

{"title":"trace me","body":"in flight"}
22:26:03.768752 IP6 ::1.8080 > ::1.35392: Flags [.], ack 175, win 511, options [nop,nop,TS val 2165058869 ecr 2165058869], length 0
`.... .@...................................@P..|..is.....(.....
..-5..-5
22:26:03.784747 IP6 ::1.8080 > ::1.35392: Flags [P.], seq 1:207, ack 175, win 512, options [nop,nop,TS val 2165058885 ecr 2165058869], length 206: HTTP: HTTP/1.1 201 Created
`......@...................................@P..|..is...........
..-E..-5HTTP/1.1 201 Created
Content-Type: application/json
Date: Tue, 16 Jun 2026 19:26:03 GMT
Content-Length: 93

{"id":9,"title":"trace me","body":"in flight","created_at":"2026-06-16T19:26:03.770537887Z"}

22:26:03.784794 IP6 ::1.35392 > ::1.8080: Flags [.], ack 207, win 511, options [nop,nop,TS val 2165058885 ecr 2165058885], length 0
`..=. .@.................................@....isP..J.....(.....
..-E..-E
22:26:03.785140 IP6 ::1.35392 > ::1.8080: Flags [F.], seq 175, ack 207, win 512, options [nop,nop,TS val 2165058885 ecr 2165058885], length 0
`..=. .@.................................@....isP..J.....(.....
..-E..-E
22:26:03.785262 IP6 ::1.8080 > ::1.35392: Flags [F.], seq 207, ack 176, win 512, options [nop,nop,TS val 2165058885 ecr 2165058885], length 0
`.... .@...................................@P..J..it.....(.....
..-E..-E
22:26:03.785303 IP6 ::1.35392 > ::1.8080: Flags [.], ack 208, win 512, options [nop,nop,TS val 2165058885 ecr 2165058885], length 0
`..=. .@.................................@....itP..K.....(.....
..-E..-E
22:26:13.528745 IP6 ::1.35164 > ::1.8080: Flags [S], seq 2848796881, win 65476, options [mss 65476,sackOK,TS val 2165066684 ecr 0,nop,wscale 7], length 0
`..&.(.@.................................\....0..........0.........
..K.........
22:26:13.528766 IP6 ::1.8080 > ::1.35164: Flags [S.], seq 2128901973, ack 2848796882, win 65464, options [mss 65476,sackOK,TS val 2165066684 ecr 2165066684,nop,wscale 7], length 0
`....(.@...................................\~.wU..0......0.........
..K...K.....
22:26:13.528777 IP6 ::1.35164 > ::1.8080: Flags [.], ack 1, win 512, options [nop,nop,TS val 2165066684 ecr 2165066684], length 0
`..&. .@.................................\....0.~.wV.....(.....
..K...K.
22:26:13.528867 IP6 ::1.35164 > ::1.8080: Flags [P.], seq 1:84, ack 1, win 512, options [nop,nop,TS val 2165066684 ecr 2165066684], length 83: HTTP: POST /notes HTTP/1.1
`..&.s.@.................................\....0.~.wV.....{.....
..K...K.POST /notes HTTP/1.1
Host: localhost:8080
User-Agent: curl/8.5.0
Accept: */*


22:26:13.528872 IP6 ::1.8080 > ::1.35164: Flags [.], ack 84, win 511, options [nop,nop,TS val 2165066684 ecr 2165066684], length 0
`.... .@...................................\~.wV..1%.....(.....
..K...K.
22:26:13.529406 IP6 ::1.8080 > ::1.35164: Flags [P.], seq 1:148, ack 84, win 512, options [nop,nop,TS val 2165066685 ecr 2165066684], length 147: HTTP: HTTP/1.1 400 Bad Request
`......@...................................\~.wV..1%...........
..K...K.HTTP/1.1 400 Bad Request
Content-Type: application/json
Date: Tue, 16 Jun 2026 19:26:13 GMT
Content-Length: 30

{"error":"invalid JSON body"}

22:26:13.529438 IP6 ::1.35164 > ::1.8080: Flags [.], ack 148, win 511, options [nop,nop,TS val 2165066685 ecr 2165066685], length 0
`..&. .@.................................\....1%~.w......(.....
..K...K.
22:26:13.529634 IP6 ::1.35164 > ::1.8080: Flags [F.], seq 84, ack 148, win 512, options [nop,nop,TS val 2165066685 ecr 2165066685], length 0
`..&. .@.................................\....1%~.w......(.....
..K...K.
Loading