+ @temp = split(/\n/,$proxysettings{'PORTS_SAFE'});
+ undef $proxysettings{'PORTS_SAFE'};
+ foreach (@temp)
+ {
+ s/^\s+//g; s/\s+$//g;
+ if ($_)
+ {
+ $line = $_;
+ if (/^[^#]+\s+#\sSquids\sport/) { s/(^[^#]+)(\s+#\sSquids\sport)/$proxysettings{'PROXY_PORT'}\2/; $line=$_; }
+ s/#.*//g; s/\s+//g;
+ if (/.*-.*-.*/) { $errormessage = $Lang::tr{'advproxy errmsg invalid destination port'}; }
+ @templist = split(/-/);
+ foreach (@templist) { unless (&General::validport($_)) { $errormessage = $Lang::tr{'advproxy errmsg invalid destination port'}; } }
+ $proxysettings{'PORTS_SAFE'} .= $line."\n";
+ }
+ }
+
+ @temp = split(/\n/,$proxysettings{'PORTS_SSL'});
+ undef $proxysettings{'PORTS_SSL'};
+ foreach (@temp)
+ {
+ s/^\s+//g; s/\s+$//g;
+ if ($_)
+ {
+ $line = $_;
+ s/#.*//g; s/\s+//g;
+ if (/.*-.*-.*/) { $errormessage = $Lang::tr{'advproxy errmsg invalid destination port'}; }
+ @templist = split(/-/);
+ foreach (@templist) { unless (&General::validport($_)) { $errormessage = $Lang::tr{'advproxy errmsg invalid destination port'}; } }
+ $proxysettings{'PORTS_SSL'} .= $line."\n";
+ }
+ }
+
+ @temp = split(/\n/,$proxysettings{'DST_NOCACHE'});
+ undef $proxysettings{'DST_NOCACHE'};
+ foreach (@temp)
+ {
+ s/^\s+//g; s/\s+$//g;
+ if ($_)
+ {
+ unless (/^\./) { $_ = '.'.$_; }
+ $proxysettings{'DST_NOCACHE'} .= $_."\n";
+ }
+ }
+