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