summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-12 16:17:30 +0100
committerHaru <haru@dotalux.com>2016-08-19 21:32:25 +0200
commitc0e59c874786cdf3bc5863090934b8e18ba0336d (patch)
tree3a6bd3e9c84dbc6dcebede4e275718b9d6371e26 /tools
parenta8ca27d2b3628d256acdddca8cffb614f583a9c3 (diff)
downloadhercules-c0e59c874786cdf3bc5863090934b8e18ba0336d.tar.gz
hercules-c0e59c874786cdf3bc5863090934b8e18ba0336d.tar.bz2
hercules-c0e59c874786cdf3bc5863090934b8e18ba0336d.tar.xz
hercules-c0e59c874786cdf3bc5863090934b8e18ba0336d.zip
Ported socket.conf (was packet.conf) to libconfig
Ported to modern Hercules and cleaned up from Panikon's commits: b10f2a88073882bea812c6278fdec7848102ab87, bc5007299a92898ea4630f2a977d9a1b42b6c145 Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configconverter.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/configconverter.pl b/tools/configconverter.pl
index 958286c49..669e3741c 100755
--- a/tools/configconverter.pl
+++ b/tools/configconverter.pl
@@ -514,6 +514,23 @@ my @defaults = (
import => {parse => \&parsecfg_string, print => \&printcfg_nil, path => "", default => "conf/import/script_conf.txt"},
}
},
+ {
+ files => ['packet.conf', 'import/packet_conf.txt'],
+ settings => {
+ debug => {parse => \&parsecfg_bool, print => \&printcfg_bool, path => "socket:socket_configuration/", default => "false"},
+ stall_time => {parse => \&parsecfg_int, print => \&printcfg_int, path => "socket:socket_configuration/", default => 60},
+ epoll_maxevents => {parse => \&parsecfg_int, print => \&printcfg_int, path => "socket:socket_configuration/", default => 1024},
+ socket_max_client_packet => {parse => \&parsecfg_int, print => \&printcfg_int, path => "socket:socket_configuration/", default => 65535},
+ enable_ip_rules => {parse => \&parsecfg_bool, print => \&printcfg_bool, path => "socket:socket_configuration/ip_rules/enable", default => "true"},
+ order => {parse => \&parsecfg_string, print => \&printcfg_string, path => "socket:socket_configuration/ip_rules/", default => "deny,allow"},
+ allow => {parse => \&parsecfg_stringarr, print => \&printcfg_strlist, path => "socket:socket_configuration/ip_rules/allow_list", default => []},
+ deny => {parse => \&parsecfg_stringarr, print => \&printcfg_strlist, path => "socket:socket_configuration/ip_rules/deny_list", default => []},
+ ddos_interval => {parse => \&parsecfg_int, print => \&printcfg_int, path => "socket:socket_configuration/ddos/interval", default => 3000},
+ ddos_count => {parse => \&parsecfg_int, print => \&printcfg_int, path => "socket:socket_configuration/ddos/count", default => 5},
+ ddos_autoreset => {parse => \&parsecfg_int, print => \&printcfg_int, path => "socket:socket_configuration/ddos/autoreset", default => 600000},
+ import => {parse => \&parsecfg_string, print => \&printcfg_nil, path => "", default => "conf/import/packet_conf.txt"},
+ }
+ },
);
for (@ARGV) {