1 |
michel |
1.1 |
diff -urN e-smith-proxy-5.6.0.old/createlinks e-smith-proxy-5.6.0/createlinks |
2 |
|
|
--- e-smith-proxy-5.6.0.old/createlinks 2020-12-09 23:58:52.730000000 +0400 |
3 |
|
|
+++ e-smith-proxy-5.6.0/createlinks 2020-12-10 00:26:38.006000000 +0400 |
4 |
|
|
@@ -38,12 +38,7 @@ |
5 |
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/masq"); |
6 |
|
|
} |
7 |
|
|
|
8 |
|
|
-# remove with systemd |
9 |
|
|
-# Daemontools links. |
10 |
|
|
-##safe_symlink("../daemontools", "root/etc/rc.d/init.d/supervise/squid"); |
11 |
|
|
-##safe_symlink("../var/service/squid", "root/service/squid"); |
12 |
|
|
# Runlevel init links. |
13 |
|
|
-##safe_symlink("../init.d/e-smith-service", "root/etc/rc.d/rc7.d/S90squid"); |
14 |
|
|
safe_symlink("../init.d/e-smith-service", "root/etc/rc.d/rc6.d/K25squid"); |
15 |
|
|
safe_symlink("../init.d/e-smith-service", "root/etc/rc.d/rc0.d/K25squid"); |
16 |
|
|
|
17 |
|
|
@@ -57,6 +52,4 @@ |
18 |
|
|
|
19 |
|
|
templates2events("/etc/systemd/system-preset/49-koozali.preset", $event); |
20 |
|
|
templates2events("/usr/lib/systemd/system/squid.service.d/50koozali.conf", $event); |
21 |
|
|
-#event_link("systemd-default", $event, "10"); |
22 |
|
|
-event_link("systemd-reload", $event, "94"); |
23 |
|
|
-event_link("reset-unsavedflag", $event, "95"); |
24 |
|
|
+event_link("systemd-reload", $event, "89"); |
25 |
|
|
diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy |
26 |
|
|
--- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy 2002-10-02 20:12:30.000000000 +0400 |
27 |
|
|
+++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/35transproxy 2020-12-10 16:18:48.677000000 +0400 |
28 |
|
|
@@ -24,7 +24,8 @@ |
29 |
|
|
my $transproxy = $squid{Transparent} || "yes"; |
30 |
|
|
my $status = $squid{status} || "disabled"; |
31 |
|
|
if ($transproxy eq "yes" && $status eq "enabled") { |
32 |
|
|
- my $proxyport = $squid{TransparentPort} || "3128"; |
33 |
|
|
+ ##my $proxyport = $squid{TransparentPort} || "3128"; |
34 |
|
|
+ my $proxyport = $squid{InterceptPort} || "8080"; |
35 |
|
|
|
36 |
|
|
# Otherwise, divert port 80 traffic through our proxy |
37 |
|
|
$OUT .= " /sbin/iptables --table nat --append TransProxy\\\n"; |
38 |
|
|
diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustTransProxy e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustTransProxy |
39 |
|
|
--- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustTransProxy 2002-09-12 05:51:21.000000000 +0400 |
40 |
|
|
+++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustTransProxy 2020-12-10 16:19:39.318000000 +0400 |
41 |
|
|
@@ -16,7 +16,8 @@ |
42 |
|
|
my $status = $squid{status} || "disabled"; |
43 |
|
|
if ($transproxy eq "yes" && $status eq "enabled") |
44 |
|
|
{ |
45 |
|
|
- my $proxyport = $squid{TransparentPort} || "3128"; |
46 |
|
|
+ ##my $proxyport = $squid{TransparentPort} || "3128"; |
47 |
|
|
+ my $proxyport = $squid{InterceptPort} || "8080"; |
48 |
|
|
|
49 |
|
|
# Otherwise, divert port 80 traffic through our proxy |
50 |
|
|
$OUT .= " /sbin/iptables --table nat --replace TransProxy $rule\\\n"; |
51 |
|
|
diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/squid/squid.conf/10HTTPPort e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/squid/squid.conf/10HTTPPort |
52 |
|
|
--- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/squid/squid.conf/10HTTPPort 2008-10-07 21:37:03.000000000 +0400 |
53 |
|
|
+++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/squid/squid.conf/10HTTPPort 2020-12-10 16:17:00.077000000 +0400 |
54 |
|
|
@@ -2,10 +2,12 @@ |
55 |
|
|
my $transproxy = $squid{Transparent} || "yes"; |
56 |
|
|
|
57 |
|
|
if ($transproxy eq 'yes') { |
58 |
|
|
- $OUT .= "http_port $LocalIP:" . ($squid{TCPPort} || '3128') . " transparent\n"; |
59 |
|
|
- $OUT .= "http_port 127.0.0.1:" . ($squid{TCPPort} || '3128') . ' transparent'; |
60 |
|
|
+ $OUT .= "http_port $LocalIP:" . ($squid{TCPPort} || '3128') . "\n"; |
61 |
|
|
+ $OUT .= "http_port 127.0.0.1:" . ($squid{TCPPort} || '3128') . "\n"; |
62 |
|
|
+ $OUT .= "http_port $LocalIP:" . ($squid{InterceptPort} || '8080') . " intercept\n"; |
63 |
|
|
+ $OUT .= "http_port 127.0.0.1:" . ($squid{InterceptPort} || '8080') . " intercept\n"; |
64 |
|
|
} else { |
65 |
|
|
$OUT .= "http_port $LocalIP:" . ($squid{TCPPort} || '3128') . "\n"; |
66 |
|
|
- $OUT .= "http_port 127.0.0.1:" . ($squid{TCPPort} || '3128'); |
67 |
|
|
+ $OUT .= "http_port 127.0.0.1:" . ($squid{TCPPort} || '3128') . "\n"; |
68 |
|
|
} |
69 |
|
|
} |
70 |
|
|
diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/sysconfig/squid/10ALL_ORIG e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/sysconfig/squid/10ALL_ORIG |
71 |
|
|
--- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/sysconfig/squid/10ALL_ORIG 1970-01-01 04:00:00.000000000 +0400 |
72 |
|
|
+++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/sysconfig/squid/10ALL_ORIG 2020-12-12 00:10:57.820000000 +0400 |
73 |
|
|
@@ -0,0 +1,10 @@ |
74 |
|
|
+# default squid options |
75 |
|
|
+SQUID_OPTS="" |
76 |
|
|
+ |
77 |
|
|
+# Time to wait for Squid to shut down when asked. Should not be necessary |
78 |
|
|
+# most of the time. |
79 |
|
|
+SQUID_SHUTDOWN_TIMEOUT=100 |
80 |
|
|
+ |
81 |
|
|
+# default squid conf file |
82 |
|
|
+SQUID_CONF="/etc/squid/squid.conf" |
83 |
|
|
+ |
84 |
|
|
diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/sysconfig/squid/20OPTS e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/sysconfig/squid/20OPTS |
85 |
|
|
--- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/etc/sysconfig/squid/20OPTS 1970-01-01 04:00:00.000000000 +0400 |
86 |
|
|
+++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/etc/sysconfig/squid/20OPTS 2020-12-12 00:04:56.997000000 +0400 |
87 |
|
|
@@ -0,0 +1,4 @@ |
88 |
|
|
+# specific squid options |
89 |
|
|
+SQUID_OPTS="-s" |
90 |
|
|
+ |
91 |
|
|
+ |
92 |
|
|
diff -urN e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/40service e-smith-proxy-5.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/40service |
93 |
|
|
--- e-smith-proxy-5.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/40service 2020-12-09 23:58:52.730000000 +0400 |
94 |
|
|
+++ e-smith-proxy-5.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/squid.service.d/50koozali.conf/40service 2020-12-12 00:33:27.983000000 +0400 |
95 |
|
|
@@ -1,12 +1,11 @@ |
96 |
|
|
[Service] |
97 |
|
|
{ |
98 |
|
|
- # Is there a Files limit in the configuration database |
99 |
|
|
- $OUT .= "LimitNOFILE="; |
100 |
|
|
- $OUT .= $squid{MaxFileDesc} || 4096; |
101 |
|
|
- $OUT .= "\n"; |
102 |
|
|
+# Is there a Files limit in the configuration database |
103 |
|
|
+$OUT .= "LimitNOFILE="; |
104 |
|
|
+$OUT .= $squid{MaxFileDesc} || 4096; |
105 |
|
|
+$OUT .= "\n"; |
106 |
|
|
} |
107 |
|
|
-#ExecStartPre=-/sbin/e-smith/expand-template /etc/squid/squid.conf |
108 |
|
|
-User=squid |
109 |
|
|
-Group=squid |
110 |
|
|
-# $squid -f $config -sN ---->> $SQUID_CONF |
111 |
|
|
- |
112 |
|
|
+# squid option -s ---->> $SQUID_OPTS |
113 |
|
|
+ExecStartPre=/sbin/e-smith/service-status squid |
114 |
|
|
+User=root |
115 |
|
|
+Group=root |