74045356f6757a5cb2e336cd14e05833bca36293
[exim.git] / test / scripts / 4027-TFO-socks / 4027
1 # socks5 proxy on smtp transport, TCP Fast Open
2 #
3 munge loopback
4 #
5 #
6 # Wipe any stored TFO cookie, to start from known state.
7 # Disable TFO blackhole-detection as we seem to be running afoul of that
8 sudo perl
9 system ("ip tcp_metrics delete 127.0.0.1");
10 system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 0 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
11 ****
12 #
13 # TFO both clients and server, no cookie yet
14 server -tfo PORT_D
15 <<\x05\x01\x00
16 >>\x05\x00
17 <<\x05\x01\x00\x01\x7f\x00\x00\x01\x04\xc8
18 >>\x05\x00\x00\x01\x7f\x00\x00\x01\xbe\xef
19 220 Connected OK
20 EHLO
21 250-server id
22 250
23 MAIL FROM
24 250
25 RCPT TO
26 250
27 DATA
28 354 go ahead
29 .
30 250 accepted OK
31 QUIT
32 250 bye
33 ****
34 #
35 #
36 exim -odi -bs -DOPT=
37 ehlo test.ex
38 mail from:<>
39 rcpt to:<user_tfo@test.ex>
40 data
41 Date: Fri, 17 Dec 2004 14:35:01 +0100
42 Subject: message should be sent
43
44 connection trying TFO via proxy; no cookie yet
45 .
46 quit
47 ****
48 #
49 #
50 #
51 # TFO client, not server
52 server PORT_D
53 <<\x05\x01\x00
54 >>\x05\x00
55 <<\x05\x01\x00\x01\x7f\x00\x00\x01\x04\xc8
56 >>\x05\x00\x00\x01\x7f\x00\x00\x01\xbe\xef
57 220 Connected OK
58 EHLO
59 250-server id
60 250
61 MAIL FROM
62 250
63 RCPT TO
64 250
65 DATA
66 354 do me
67 .
68 250 accepted OK
69 QUIT
70 250 bye
71 ****
72 #
73 #
74 exim -odi -bs -DOPT=
75 ehlo test.ex
76 mail from:<>
77 rcpt to:<user_tfo@test.ex>
78 data
79 Date: Fri, 17 Dec 2004 14:35:01 +0100
80 Subject: message should be sent
81
82 connection trying TFO
83 via null-auth proxy
84 .
85 quit
86 ****
87 #
88 #
89 #
90 # TFO client and server
91 server -tfo PORT_D
92 <<\x05\x01\x00
93 >>\x05\x00
94 <<\x05\x01\x00\x01\x7f\x00\x00\x01\x04\xc8
95 >>\x05\x00\x00\x01\x7f\x00\x00\x01\xbe\xef
96 220 Connected OK
97 EHLO
98 250-server id
99 250
100 MAIL FROM
101 250
102 RCPT TO
103 250
104 DATA
105 354 do me mate
106 .
107 250 accepted OK
108 QUIT
109 250 bye
110 ****
111 #
112 #
113 exim -odi -bs -DOPT=
114 ehlo test.ex
115 mail from:<>
116 rcpt to:<user_tfo@test.ex>
117 data
118 Date: Fri, 17 Dec 2004 14:35:01 +0100
119 Subject: message should be sent
120
121 connection using TFO
122 via null-auth proxy
123 .
124 quit
125 ****
126 #
127 millisleep 500
128 #
129 sudo perl
130 system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 3600 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
131 ****
132 #
133 # Ends