Skip to content

Commit a58f725

Browse files
committed
disable setting up squid on proxy node
1 parent 8f02ff1 commit a58f725

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

e2e/cluster/cluster.go

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -289,32 +289,32 @@ func CreateProxy(in *Input) string {
289289
func ConfigureProxy(in *Input) {
290290
// starts by installing dependencies, setting up the second network interface ip
291291
// address and configuring iptables to allow dns requests forwarding (nat).
292-
proxyName := fmt.Sprintf("node-%s-proxy", in.id)
293-
for _, cmd := range [][]string{
294-
{"apt-get", "update", "-y"},
295-
{"apt-get", "install", "-y", "iptables", "squid"},
296-
{"ip", "addr", "add", "10.0.0.254/24", "dev", "eth1"},
297-
{"ip", "link", "set", "eth1", "up"},
298-
{"sysctl", "-w", "net.ipv4.ip_forward=1"},
299-
{"iptables", "-t", "nat", "-o", "eth0", "-A", "POSTROUTING", "-p", "udp", "--dport", "53", "-j", "MASQUERADE"},
300-
} {
301-
RunCommandOnNode(in, cmd, proxyName)
302-
}
303-
304-
// create a simple squid configuration that allows for localnet access. upload it
305-
// to the proxy in the right location. restart squid to apply the configuration.
306-
tmpfile, err := os.CreateTemp("", "squid-config-*.conf")
307-
if err != nil {
308-
in.T.Fatalf("Failed to create temp file: %v", err)
309-
}
310-
defer os.Remove(tmpfile.Name())
311-
if _, err = tmpfile.WriteString("http_access allow localnet\n"); err != nil {
312-
in.T.Fatalf("Failed to write to temp file: %v", err)
313-
}
314-
file := File{SourcePath: tmpfile.Name(), DestPath: "/etc/squid/conf.d/ec.conf", Mode: 0644}
315-
tmpfile.Close()
316-
CopyFileToNode(in, proxyName, file)
317-
RunCommandOnNode(in, []string{"systemctl", "restart", "squid"}, proxyName)
292+
//proxyName := fmt.Sprintf("node-%s-proxy", in.id)
293+
//for _, cmd := range [][]string{
294+
// {"apt-get", "update", "-y"},
295+
// {"apt-get", "install", "-y", "iptables", "squid"},
296+
// {"ip", "addr", "add", "10.0.0.254/24", "dev", "eth1"},
297+
// {"ip", "link", "set", "eth1", "up"},
298+
// {"sysctl", "-w", "net.ipv4.ip_forward=1"},
299+
// {"iptables", "-t", "nat", "-o", "eth0", "-A", "POSTROUTING", "-p", "udp", "--dport", "53", "-j", "MASQUERADE"},
300+
//} {
301+
// RunCommandOnNode(in, cmd, proxyName)
302+
//}
303+
//
304+
//// create a simple squid configuration that allows for localnet access. upload it
305+
//// to the proxy in the right location. restart squid to apply the configuration.
306+
//tmpfile, err := os.CreateTemp("", "squid-config-*.conf")
307+
//if err != nil {
308+
// in.T.Fatalf("Failed to create temp file: %v", err)
309+
//}
310+
//defer os.Remove(tmpfile.Name())
311+
//if _, err = tmpfile.WriteString("http_access allow localnet\n"); err != nil {
312+
// in.T.Fatalf("Failed to write to temp file: %v", err)
313+
//}
314+
//file := File{SourcePath: tmpfile.Name(), DestPath: "/etc/squid/conf.d/ec.conf", Mode: 0644}
315+
//tmpfile.Close()
316+
//CopyFileToNode(in, proxyName, file)
317+
//RunCommandOnNode(in, []string{"systemctl", "restart", "squid"}, proxyName)
318318

319319
// set the default route on all other nodes to point to the proxy we just created.
320320
// this makes it easier to ensure no internet will work on them other than dns and

0 commit comments

Comments
 (0)