4 Commits

Author SHA1 Message Date
8253bc0805 * Tue Oct 07 2025 Brian Read <brianr@koozali.org> 1.3.1-28.sme
- Add UTF8 and avoid potential DB caching problems [SME: 13209]
2025-10-07 14:55:28 +01:00
b8731843ed * Sat Oct 04 2025 Brian Read <brianr@koozali.org> 1.3.1-27.sme
- Remove smanager-refresh from spec file [SME: 13212]
2025-10-04 11:05:27 +01:00
John Crisp
02f87475ff * Thu Mar 20 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 1.3.1-26.sme
- Fix createlink typo remote-access-update [SME: 12438]
2025-03-20 12:36:51 +01:00
John Crisp
725b2f5418 * Thu Feb 13 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 1.3.1-25.sme
- Fix various typos as per bug but more to find [SME: 12472]
2025-02-13 20:07:42 +01:00
6 changed files with 33 additions and 25 deletions

View File

@@ -38,7 +38,7 @@ for my $event (qw(xt_geoip-update bootstrap-console-save
event_link("smeserver-xt_geoip-download-action", $event, "10");
}
for my $event (qw(bootstrap-console-save e-smith-packetfilter-update
smeserver-xt_geoip-update remote-access-update))
smeserver-xt_geoip-update remoteaccess-update))
{
event_link("xt_geoip_kmod", $event, "15");
}

View File

@@ -19,13 +19,13 @@ use Locale::gettext;
use SrvMngr::I18N;
use SrvMngr qw( theme_list init_session );
# our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
# our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my ($cdb);
sub main {
my $c = shift;
$c->app->log->info($c->log_req);
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my $title = $c->render_to_string(inline => ($c->l('xtg_FORM_TITLE')));
my %xtg_datas = ();
$xtg_datas{'choice'} = '';
@@ -36,7 +36,7 @@ sub main {
sub do_display {
my $c = shift;
$c->app->log->info($c->log_req);
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my $title = $c->render_to_string(inline => ($c->l('xtg_FORM_TITLE')));
my $choice = $c->param('Choice');
my $result;
@@ -107,7 +107,7 @@ sub do_display {
sub do_action {
my $c = shift;
$c->app->log->info($c->log_req);
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my $rt = $c->current_route;
my $title = $c->render_to_string(inline => ($c->l('xtg_FORM_TITLE')));
my %xtg_datas = ();
@@ -198,7 +198,7 @@ sub do_action {
sub get_badcountries {
my $c = shift;
my $full = shift;
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my $badc = $cdb->get_prop("masq", "BadCountries") || "";
return $badc unless $full;
my $rev = (($cdb->get_prop("masq", "XTGeoipRev") || "disabled") eq "enabled") ? "!=" : "==";
@@ -233,7 +233,7 @@ sub get_stat_geoip {
sub get_stat_license_key {
my $c = shift;
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
if (($cdb->get_prop('geoip', 'status') || 'disabled') eq 'enabled') {
if (($cdb->get_prop('geoip', 'LicenseKey') || '') ne '') {
@@ -257,7 +257,7 @@ sub get_srv_name {
sub get_services_table {
my $c = shift;
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my $choice = shift || 'sel';
my @services;
my @serv_rec;
@@ -280,7 +280,7 @@ sub get_services_table {
sub get_srv_badcountries {
my ($c, $name, $full) = @_;
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my $badc = $cdb->get_prop($name, "BadCountries") || "";
return $badc unless $full;
my $rev = (($cdb->get_prop($name, "XTGeoipRev") || "disabled") eq "enabled") ? "!=" : "==";
@@ -349,7 +349,7 @@ sub generateCodes {
#Subroutine to list other services codes
sub otherServices {
my ($c, $choice) = @_;
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my %serv_ok = map { $_ => 1 } split(/,/, $cdb->get_prop("masq", "XtServices"));
# unless $choice eq 'all';
@@ -370,7 +370,7 @@ sub otherServices {
#Subroutine to update list services codes
sub do_otherServices {
my $c = shift;
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my $serv1 = ($cdb->get_prop("masq", "XtServices")) || '';
my $serv2 = join(',', @{ $c->every_param('Selectedservices') });
$cdb->set_prop("masq", "XtServices", $serv2) if ($serv1 ne $serv2);
@@ -379,7 +379,7 @@ sub do_otherServices {
sub change_settings {
my $c = shift;
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my $mq_bc = get_badcountries();
my $mq_gp = get_geoip();
my $masq = $cdb->get('masq') || "disabled";
@@ -438,7 +438,7 @@ sub must_exist {
sub remove_serv {
my ($c) = @_;
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my $name = $c->param('Name');
# Untaint $name before use in system()
@@ -464,7 +464,7 @@ sub remove_serv {
sub modify_serv {
my ($c) = @_;
our $cdb = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
our $cdb = esmith::ConfigDB::UTF8->open() or die "Couldn't open ConfigDB::UTF8\n";
my $name = $c->param('Name');
# Untaint $name before use in system()

View File

@@ -31,7 +31,7 @@
% foreach my $sv (@services) {
% my $svBC = $sv->prop('BadCountries') || ' ';
% my $svRev = (( $sv->prop('Xt_geoipRev')|| 'disabled') eq 'disabled' )? '==': '!=';
% my $svRev = (( $sv->prop('XTGeoipRev')|| 'disabled') eq 'disabled' )? '==': '!=';
% my $color = 'red';
% my $deco= "none";
% if ($svRev eq '!=' ) { $color = 'green'; }

View File

@@ -44,7 +44,7 @@
<br><span class=label>
%=l 'xtg_LABEL_REVERSE_MATCH'
</span><span class=data>
% param 'Masq_srv_reverse' => $c->get_reverse('','Xt_geoipRev') unless param 'Masq_srv_reverse';
% param 'Masq_srv_reverse' => $c->get_reverse('masq','XTGeoipRev') unless param 'Masq_srv_reverse';
%= select_field 'Masq_srv_reverse' => [['!=' => 'enabled'], ['==' => 'disabled']], class => 'input'
</span></p>

View File

@@ -35,7 +35,7 @@
<br><span class=label>
%=l 'xtg_LABEL_REVERSE_MATCH'
</span><span class=data>
% param 'Masq_reverse' => $c->get_reverse('masq','Xt_geoipRev') unless param 'Masq_reverse';
% param 'Masq_reverse' => $c->get_reverse('masq','XTGeoipRev') unless param 'Masq_reverse';
%= select_field 'Masq_reverse' => [[ '!=' => 'enabled'], [ '==' => 'disabled']], class => 'input'
</span></p>
@@ -59,7 +59,7 @@
<br><span class=label>
%=l 'xtg_LABEL_OTHERS'
</span><span class=data>
% param 'Masq_others' => $c->get_reverse('masq','Xt_geoipOther') unless param 'Masq_others';
% param 'Masq_others' => $c->get_reverse('masq','XT_GeoipOther') unless param 'Masq_others';
%= select_field 'Masq_others' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'
</span></p>

View File

@@ -1,6 +1,6 @@
%define name smeserver-xt_geoip
%define version 1.3.1
%define release 24
%define release 28
Summary: smserver rpm to setup database, update and configuration for xt_geoip module with a panel.
Name: %{name}
@@ -69,10 +69,6 @@ rm -rf %{name}-%{version}
%post
if (systemctl list-unit-files |grep smanager) then
echo "Smanager restart in spec file"
/sbin/e-smith/signal-event smanager-refresh;
fi
%postun
@@ -82,9 +78,21 @@ fi
%changelog
* Tue Oct 07 2025 Brian Read <brianr@koozali.org> 1.3.1-28.sme
- Add UTF8 and avoid potential DB caching problems [SME: 13209]
* Sat Oct 04 2025 Brian Read <brianr@koozali.org> 1.3.1-27.sme
- Remove smanager-refresh from spec file [SME: 13212]
* Thu Mar 20 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 1.3.1-26.sme
- Fix createlink typo remote-access-update [SME: 12438]
* Thu Feb 13 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 1.3.1-25.sme
- Fix various typos as per bug but more to find [SME: 12472]
* Thu Feb 13 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 1.3.1-24.sme
- move scriptoig back to /usr/share/geoip
- Lose the LE/BE (Little/Big Endian) parts as iptables can't seme to read the file in subdirs
- move scripting back to /usr/share/geoip
- Lose the LE/BE (Little/Big Endian) parts as iptables can't seem to read the file in subdirs
- Update ULOG to NFLOG in rules but restricts the number of countries
* Wed Feb 12 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 1.3.1-23.sme